Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Measurement Total in report is not equal to sum of details

Hello,

I'm facing a problem with Qlik Cloud. My report has the following layout:

Holiday                                        30

     Not billable                              30

          Employee 1                         8

          Employee 2                        40

Holiday, Not billable, Employee 1 and 2 are dimensions of the report, while the numbers represent the hours and this is a measure. The formula of the measure is sum(quantity).

The total of Holiday and Not billable should be 8 plus 40 is 48. In the report another number is shown, in this case 30.

Do anybody why the totals are not calcuclated the right way?

Kind regards, Ronald Janssen.

5 Replies
sunny_talwar

I know you mentioned your expression is Sum(quantity, but I just wonder if you have any if condition or dimension limits  or calculated dimensions in your chart?

Gysbert_Wassenaar

Sounds like you're using a pivot table. The totals simply the measure calculated at the total level, not the sum of the measure values of the rows of the lower level. If you want to have a sum of rows then you need to use something that involves the aggr function. Perhaps this: sum(aggr(sum([quantity]),[Holiday dimension here],[Billable/Not billable dimension here],[Employee dimension here]))


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Sunny,

I have nothing special in my chart. The dimensions are straight forward (just fields) and the formula of the measurement is Sum(quantity).

Met vriendelijke groet,

Ronald Janssen

Anonymous
Not applicable
Author

Hi Gysbert,

I used your syntax and it works now!

Thank you for your help.

Met vriendelijke groet,

Ronald Janssen

Anonymous
Not applicable
Author

Hi Sunny,

The problem is solved. From another colleague I got the tip to use the following syntax for the measurement formula:

Sum(Aggr(sum(quantity), urensoort, itemId, projectId, Naam, week))

After using the formula above, it works now!

Met vriendelijke groet,

Ronald Janssen