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: 
zagzebski
Creator
Creator

Set analysis (using -= with a YTD indicator)

My Data:

YTDAmount
YTD75
-25

I want to return the null value of YTD which is 25, but I keep getting a " 0 ":

=sum({<YTD-={'YTD'}>} Amount)

6 Replies
MK_QSL
MVP
MVP

=SUM({$<YTD = {"=Len(Trim(Replace(YTD,'-','')))=0"}>}Amount)

zagzebski
Creator
Creator
Author

Thanks for the response, Unfortunately I am still getting a " 0 ".

Any thoughts?

anbu1984
Master III
Master III

It's not working because of Null value in YTD. Try this

=sum({1-<YTD={'YTD'}>} Amount)

MK_QSL
MVP
MVP

Provide your data.... Both My and Anbu's solution should work...

anbu1984
Master III
Master III

Or

=sum({<Amount=E({<YTD={'YTD'}>})>} Amount)

maxgro
MVP
MVP

set analysis

sum({1-<YTD={"*"}>} Amount)

no sa

sum(if(IsNull(YTD),Amount))