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

Previous Day - Set analysis - Not working

Hi All,

I need to be able to display the selected dates data, and the previous days data, but I am not including any date fields in my pivot table.

I am using this expression, but it is giving me 0.

Sum ({$< [As at Date] ={"$(=Only([As at Date])-1)"}>}  [MTM P/L(USD)])/1000

Please can you help?

Thanks

Sally

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

Sum ({$< [As at Date] ={"$(=Date([As at Date]-1))"}>}  [MTM P/L(USD)])/1000

hope this helps

Sunil Chauhan

View solution in original post

4 Replies
swuehl
MVP
MVP

Try formatting your set modifier the same way as your date, e.g.

Sum ({$< [As at Date] ={'$(=Date(Only([As at Date])-1,'MM/DD/YYYY')) '}>}  [MTM P/L(USD)])/1000

Not applicable
Author

Hi,

Thanks for the quick response.

That still gives me a zero value.

This gives me the same value as the selected days data:

Sum ({$< [As at Date] ={"=$(=Date(Only([As at Date])-1,'MM/DD/YYYY'))"}>} [MTM P/L(USD)])/1000

I have also managed to get a total of all previous values using <=, but I just cannot get the selected value, - 1 day.

Slightly annoying.

SunilChauhan
Champion II
Champion II

Sum ({$< [As at Date] ={"$(=Date([As at Date]-1))"}>}  [MTM P/L(USD)])/1000

hope this helps

Sunil Chauhan
Not applicable
Author

Sunil,

You are a star....thank you so much!!!