Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rainstorm9
Contributor
Contributor

Set Analysis Previous level of hierarchy

I am writing a set analysis to get the count of customers in a region. I have the hierarchy as: country->region->area. When an area is selected, I want to do a count of the customers within the region that this area belongs to, in a text object.

Currently I created a variable as vRegion: only({$<Area={'$(=GetFieldSelections(Area))'}>}Region)Then in the set analysis: count({$<Region={'$(=$(vRegion))'}, Area=>} Customer_Name)

Is there any simple way of doing this instead? Thanks in advance!

Labels (4)
1 Solution

Accepted Solutions
sunny_talwar

Try this instead

Count({$<Region = P(Region), Area>} Customer_Name)

Read about P() and e() here

 

View solution in original post

2 Replies
sunny_talwar

Try this instead

Count({$<Region = P(Region), Area>} Customer_Name)

Read about P() and e() here

 

rainstorm9
Contributor
Contributor
Author

Thank you Sunny!