BusinessObjects Board

Count on mesure than

Hello
count only the number of occurrences greater than 3 absences
The following data:

Line | column: name / start of absence
Line 1 | toto | 01/03/22
Line 2 | toto | 10/03/22
Line 3 | toto | 25/03/22
Line 4 : toto | 25/09/22
Line 5 | titi | 25/03/22
Line 6 | titi | 06/03/22
Line 7 | titi | 10/10/22
Line 8 | tutu | 15/10/22

The desired final table is this:
2022 | 7
→ which corresponds to toto and titi because they have more than 3 absences

You’ll need to build this up step by step to make sure it works correctly.

If the final output is a table with year and number of absences where absentee has at least three absences in that year, then the first think you will need is a dimension object Absence Start Year as:
=Year([start of absence])

I am also making the following assumptions:
1/ Line is a unique identifier for each absence
2/ Person name is unique (let’s call that object Person for this example).

What we will be using to build the result is calculation contexts. If you are not sure how these work, please have a read up on them in the Webi User Guide for your version of BO. They are one of the most powerful elements of the reporting tool.

Firstly, start by building on to your existing data.
Add the Absence Start Year object to the block.

Then, add the following measure, defined as Absences Per Person Per Year:
=Count([Line]) IN ([Person];[Absence Year Start])
Confirm that this gives you what you expect (4 for each line for toto, 3 for titi and 1 for tutu)

Then you can start building if then else logic to exclude the rows that you don’t want.

Try it yourself first and then let us know if you get stuck - it’s better to learn by trying it yourself first. :slight_smile:

For the first table, I confirm that toto=4 and titi=3 and tutu=1
→ Formul : =count([Person]+[Absence Year Start]) IN([Person];[Absence Year Start])
=> It’s OK
For the second table, I have to obtain
2022 ; 7
2022 = Year([start of absence])
7 = if count([Person]+[Absence Year Start]) IN([Person];[Absence Year Start]) > 3 then count([Person]+[Absence Year Start])
=> Result = 8 and not 7

Would you have a solution ?