Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

paulyeo11
Not applicable

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
Not applicable

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

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

4 Replies
paulyeo11
Not applicable

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

Hi All

Enclosed my QV doc.

MK_QSL
Not applicable

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

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

maxgro
Not applicable

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

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
Not applicable

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

Hi Sir

Thank you very much . it work now.

Paul