Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

Re: How to include the selected months in the set analysis ?

Try:

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

Highlighted
Contributor
Contributor

Re: How to include the selected months in the set analysis ?

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)

Highlighted
Partner
Partner

Re: How to include the selected months in the set analysis ?

Maybe try:

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

Highlighted
Contributor
Contributor

Re: How to include the selected months in the set analysis ?

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.

Highlighted
Digital Support
Digital Support

Re: How to include the selected months in the set analysis ?

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.