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

Problem comparing information over date ranges using set analysis

Hello all,

I'm having a lot of trouble trying to get set analysis to work for me. I've attached a test version of what I'm trying to achieve with a small amount of data.

The data is coming from sql and [Date] field is dd/MM/yyyy.

I've tested that my variables work correctly (three text boxes at the bottom) but still can't get the set analysis in CH05 to correctly work.

Essentially I want to get to a stage where I'm doing a sum of revenue for vMaxDate minus sum of revenue for vPrevWeek so I can dynamically see by a variety of dimensions the difference for either the current max date or the select date.

Hopefully that is enough information but please let me know if you need anything else.

Thanks

Tom

1 Solution

Accepted Solutions
sunny_talwar

Try this

=num(sum({$<Date = {"$(=$(vMaxDate))"} >} Revenue), '£#,##0')

View solution in original post

2 Replies
sunny_talwar

Try this

=num(sum({$<Date = {"$(=$(vMaxDate))"} >} Revenue), '£#,##0')

Anonymous
Not applicable
Author

Sunny - I don't understand why it works, but it works, thank you very much.

Tom