Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bmicqlik
Contributor
Contributor

YTD RangeSum - Need help with Set Analysis

I am trying to create a cumulative YTD total by month and this code works great and producing the right numbers:

RangeSum ((Above(Total [vEarned])), sum(if (InYeartoDate ( [Full_Date], vMonthEnd, 0) ), [earned], 0)),0)

scr_capture.PNG

I really do not want the previous months' to show up here and I think I need set analysis but cannot figure out the syntax. 

Can anyone help  ?    I want the set analysis to work like the Inyeartodate function ........

Thanks in advance !!

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming the MonthName column is a dimension, could you not just suppress zeroes in your table?

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
bmicqlik
Contributor
Contributor
Author

It is and zeroes are suppressed yet it still shows this way.

Sent from my iPhone

jonathandienst
Partner - Champion III
Partner - Champion III

What other columns (expressiosn) in your table.

Might be easier to check if you post your model or a sample illustrating the problem.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
bmicqlik
Contributor
Contributor
Author

This expression works, except it repeats the

This year:

 

rangesum((Above([VEarned_TY])),sum({$<Year={$(=Max(Year))

Last year:

 

rangesum((Above([vIncurred_LY])),sum({$<Year={$(=Max(Year)-1)

BUT my dimension is month and the last month of this year repeats the last value when there is no  value to display.....