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

Modify SET expression from YTD and Month Close.

Hi All

I have below expression , it will return YTD sales :-

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

Now i need to modify the above expression to display month closed. Meaning only display Jan and Feb sales amount exclude march sales amount.

So the result should only shown 1461

Paul

1 Solution

Accepted Solutions
sunny_talwar

I think this one got already resolved, isn't it Paul?

Sum({$<year = {$(=Max(year)-0)}, month = {"<$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/$(Columndim89)/1000)

View solution in original post

4 Replies
paulyeo11
Master
Master
Author

My Qv Doc!

jonas_rezende
Specialist
Specialist

Hi, paul yeo.

Excluding the march month, not would be 2461? Please, confirm.

Regards,

Jonas Melo.

sunny_talwar

I think this one got already resolved, isn't it Paul?

Sum({$<year = {$(=Max(year)-0)}, month = {"<$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/$(Columndim89)/1000)

paulyeo11
Master
Master
Author

Hi Jonas

Many SET expert here already give me the correct solution , as for the amount is not important , as my QV sampledata file keep changing. most impt is the right expression which already confirm by the expert here. Now i aware that the = sign is to handle month closed. and '*' is to handle don't select any date.... very interesting discovery.

Paul