Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Does SET expression allow user select yr=2016 and mth =12 and still able to display value ?

Hi All

My Table have below expression display YTD sales work fine  :-

Sum({$<year = {$(=Max(year)-1)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/Rate)

And below display YTD LY sales :-

Sum({$<year = {$(=Max(year)-1)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/Rate)

My question is when user need to compare whole year 2015 vs 2016 from Jan till june sales , user click on year=2016 and month = 12

the table display null value.

May i know how to make it display YTD sales amount for both column ?

Paul

12 Replies
PrashantSangle

Hi,

It must work . Try below

Sum({$<year = {$(=Max(year)-1)}, month = {"<=12"}>}sales/Rate)


or


Sum({$<year = {$(=Max(year)-1)}, month = >}sales/Rate)


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
paulyeo11
Master
Master
Author

Hi Max

Sure I will try, thank you for so confident in yr expression. As now I take a break for my dinner.

Sent from my iPhone

paulyeo11
Master
Master
Author

Hi Max

I just test , it work fine.

Thank you

Paul