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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

set expression can display YTD sales , but can allow me click on month = feb

Hi All

I have currenct yr set expression below :-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} REVENUE/1000)

This expression give me YTD sales for 2015 = 1592 is correct.

But when i click on Feb month , it display only feb sales = 526 , which is not what i want.

when i press on feb , i need it display sum of jan and feb revenue 2015 = 1592.

when i click on jan , i need it display sum of jan revenue 2015 = 1065.

Hope some one can herlp me.

Paul

1 Solution

Accepted Solutions
maxgro
MVP
MVP

you have to check your model: you have a date field in mixed format (number and string,some null too), two month field (Month and month) etc,..... and this isn't a good start to build the charts

if you use month (not Month) in listbox and year+month as dimension your expression semms to work

1.png

View solution in original post

4 Replies
paulyeo11
Master
Master
Author

Hi All

Enclosed my QV doc.

MK_QSL
MVP
MVP

sum({$<YearMonth=, year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} REVENUE/1000)

maxgro
MVP
MVP

you have to check your model: you have a date field in mixed format (number and string,some null too), two month field (Month and month) etc,..... and this isn't a good start to build the charts

if you use month (not Month) in listbox and year+month as dimension your expression semms to work

1.png

paulyeo11
Master
Master
Author

Hi Sir

Thank you very much . it work now.

Paul