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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

My SET expression working for last 10 year Today i realize that it not working

Hi All

I have a SET expression it work for many year , today suddently it cannot work . Table 1 it only display JAn and Feb 2019 sales , which is wrong , as it never display sales after March.

money(
SUM({<year = {'$(=Max(year))'}, month = {"<=$(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today()))))"}>}sales/1/1000)
, $(vMoneyFormatK))

Table 2 can display Jan till Dec 2019 sles. which is correct.

SUM(sales)

Hope some one can advise me.

Paul

4 Replies
paulyeo11
Master
Master
Author

Hi All

Enclosed my QVW

Paul

johngouws
Partner - Specialist
Partner - Specialist

Hi Paul, 

Sorry if I misunderstand, but are you looking for the sales values for 2019 with month as a Dim.

What is wrong with:

money(
sum({<year = {'$(=Max(year))'} >} sales/1/1000)
, $(vMoneyFormatK))

 

paulyeo11
Master
Master
Author

Hi Sir

Thank you for your reply.

I think it is nothing wrong with the SET expression. I just check again it work fine. I still not sure why it behave this this ? Most likely is due to some of my raw data cause the problem.

Paul Yeo
paulyeo11
Master
Master
Author

Hi Sir

Your simplify  and short expression is also work , but for my expression I make full use of all SET command to make my table better. Like able to perform aggr sum , auto detect current month etc...

Paul