Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bob654321
Contributor
Contributor

How to include the selected months in the set analysis ?

I'm using this expression to get the counts.

Count({<Month,MonthYear={'$(vMaxMonthYear)'}, fnl_determ_qtr={$(vSelectedQuarter)}>}DISTINCT ID))

 

But the problem is the expression is only displaying the counts for maximum month in a particular quarter if quarter value in the listbox selected.  How to calculate the counts for all the months instead of just maximum month in a quarter ?

Labels (1)
5 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try:

Count({< fnl_determ_qtr={$(vSelectedQuarter)}>}DISTINCT ID))

bob654321
Contributor
Contributor
Author

It worked for the current selected year ,month and quarter. How to write the same expression for the previous quarter.  I'm not sure what is wrong with this expression ?

 

count({<quarter={"<=$(vquarter) >=$(=$(vquarter)-1)"}>} distinct ID) Where  vquarter = Max(quarternum)

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Maybe try:

count({<quarter={">=$(=$(vquarter)-1)<=$(vquarter) "}>} distinct ID) Where  vquarter = Max(quarternum)

bob654321
Contributor
Contributor
Author

I tried your expression and I'm seeing the data for only current quarter selected in the listbox. It is not displaying the data for the previous quarter.

Brett_Bleess
Former Employee
Former Employee

Bob, have a look at the following Design Blog post, might provide some further insight on this one:

https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.