Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using variable in my expression which has a set analysis in it. However it is not working.
The below expression works when I hardcode date in it.
count(distinct {<[MasterCalendarDateStartedRC.LocalFiscal_YearQlik]={'2018'}>} [ReportCard.studentid])
However, this does not.
count(distinct {<[MasterCalendarDateStartedRC.LocalFiscal_YearQlik]={'$(PreviousLocalYear)'}>} [ReportCard.studentid]).
My variable has proper value in it. I am able to see the proper year in my variable. However, the above expression always returns 0. Not sure, what am doing wrong.
Please help. Thanks.
You did not tell us the content of your variable. Is it an expression?
Try adjusting your expression to this:
count(distinct {<[MasterCalendarDateStartedRC.LocalFiscal_YearQlik]={'$(=PreviousLocalYear)'}>} [ReportCard.studentid])
Thanks for responding.. I tried modifying my expression but it still returns 0.
My 'PreviousLocalYear' variable will contain year values like 2019, 2018 etc., TheLocalFiscal_YearQlik column in MasterCalendarDateStartedRC also contain year values like 2019, 2018. I am trying to retrieve values from MasterCalendarDateStartedRC table based on the year value in my variable.
Best I can offer is the following Design Blog post on Set Analysis, and I will include the base Design Blog URL after that in case you want to search for other posts that may be helpful.
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
The other post that may be helpful would be the following:
https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822
Regards,
Brett