Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stabben23
Partner - Master
Partner - Master

Set expression compare

Hi, Here is my problem:

Selected Year 2011.

I have a customer with no sale in Dec 2011, YTD LY (2010) will only show me sale to Nov, ihave sale in dec 2010.

no_sale_20011.png

My expression for YTD LY says <=max(Month) but in this case max month will be Nov.

sum({$<Year = {$(=only(Year)-1)}, Month = {"<=$(=max(Month))"}>}Invoiced

Qlikview gives me the "correct" values based on the expression, but how should i solve this issue?

The report is dynamic so when i choose for ex okt, okt 2010 will be higlighted in YTD LY.

sum({$<Year = {$(=only(Year)-1)}, Month = {"<=$(=max({1} Month))"}>}Invoiced)

will give me the correct value, but will be static and show me sale Jan-Dec no matter what.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Is this what you need?

sum({$<Year = {$(=only(Year)-1)}, Month = {"<=$(=max({$<Year = {$(=only(Year)-1)}>} Month))"}>}Invoiced


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Is this what you need?

sum({$<Year = {$(=only(Year)-1)}, Month = {"<=$(=max({$<Year = {$(=only(Year)-1)}>} Month))"}>}Invoiced


talk is cheap, supply exceeds demand
stabben23
Partner - Master
Partner - Master
Author

Thank Gysbert,

I will remember set expression like this in future

Works as I wanted.