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: 
Braveen
Contributor III
Contributor III

Calculate unique count of lower level within higher level

I have a table structure that looks like below, I would like to calculate count of states column.

Braveen_0-1684861080762.png

I tried Aggr(count(distinct state), zone) which gives me result for one record per zone and remaining are blank.

Any idea on how to calculate this would be great.

 

 

Labels (1)
  • SaaS

11 Replies
marcus_sommer

If you want to ignore selections you may apply something like:

count({< State >} total <Zone> Field)

Braveen
Contributor III
Contributor III
Author

Tried this: count({< State >} total <Zone> Field), After applying the filter for state, metrics go blank for all states but the filtered value. Meaning, all states are still visible even after I applied the filter with correct count of states within the zone

Tried this too, aggr(count( {<State=>}distinct State), Zone) and this is giving me desired result.