Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregating a sum to different dimensions

Hello to everybody! This forum has been a great help so far, but I have found a problem that I haven´t been able to solve using the current available knowledge. First of all, thank you for taking time going through my doubt.

What I am trying to achieve is the expression 1 in the image: to sum every count depending on Dim2 but ignoring Dim1, and using it as it is shown below. The count doesn´t appear like that, but comes from the count operation of different IDs

test.PNG

What I have reached so far, by using this expression =sum( aggr(count({<Dim1>}  distinct ID), Dim2)) throws this strange result:

test2.PNG

I hope someone can help, and that I will be able to help others in the near future

Kind regards

3 Replies
sunny_talwar

Try this

Count(TOTAL <Dim2> {<Dim1>} DISTINCT ID)

Not applicable
Author

Thank you very much! It worked perfectly. I have one more question:

If we one to select the Dim1 from a list box in order to show only my desired ones, how could I achieve it? Through the formula used above, it always shows every Dim1, no matter whether it is selected.

Thank you very much so far Sunny!

sunny_talwar

That is because of the set analysis you had in your initial post.... try this

Count(TOTAL <Dim2> DISTINCT ID)