Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Sai33
Partner - Creator
Partner - Creator

Set Analysis Based on Selections

Hello All,

I've a very simple looking requirement. To get the Count of IDs based on Selections. But, have to fit the following scenarios into one expression.

  1. If there is no Selection made then Count(ID)/Count(Days)
  2. If a Year is selected than Count(ID)/Count(Days in Selected Year)
  3. If a Month is selected than Count(ID)/Count(Days in selected Month)
  4. If a Week is selected than Count(ID)/Count(Days in Selected Week)
  5. If a Day is Selected than Count(ID)

I'm not sure how to create one Set Analysis Expression to achieve this. Any pointers would be highly helpful.

TIA

Sai.

 

Labels (1)
3 Replies
yassinemhadhbi
Creator II
Creator II

Good morning 

you can use getselectedcount  and getfieldselections functions

Best Regards
Yassine Mhadhbi
Sai33
Partner - Creator
Partner - Creator
Author

I think the following expressing should work, but i'm missing something.

avg(aggr(sum({$<[Compound ID]={'REGPL'}>}VIN),[Date],[Month],[Week]))
-
avg(aggr(sum({$<[Compound ID]={'REGPL'}, Status={'5500'}>}VIN)[Date],[Month],[Week]))

Sai33
Partner - Creator
Partner - Creator
Author

The above expression doesn't give me any value