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

How to sum or count with aggr

Hi All,

I have a dataset as below. I calculate the total with this expressions, count(flag). And the Grant Total is the count of flag just for Date, Column1 and Column2. I guess I need to use aggr but I have no idea how to write the expression for Grant Total field. Would you please give me the expression or suggestion on how to achieve it?

Sample.png

Thank you for your help!

1 Solution

Accepted Solutions
Nicole-Smith

count(total <Date,Column1,Column2> flag)

The "total" tells it to ignore all dimensions, but the fields between the <> tell it not to ignore those specific dimensions.

View solution in original post

5 Replies
sunny_talwar

Try this for Grand Total:

Count(TOTAL <Date, Column1, Column2> flag)

Nicole-Smith

count(total <Date,Column1,Column2> flag)

The "total" tells it to ignore all dimensions, but the fields between the <> tell it not to ignore those specific dimensions.

Not applicable
Author

Hi Nicole,

It's exactly what I need. And I marked your answer as correct because you have a very easy understand explanation. Thank you very much!

Not applicable
Author

Thanks Sunny for your answer!!

sunny_talwar

I am glad I was able to help