Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Previous Day Issue

Hi All,

Can anybody tell me what I am doing wrong here? Using the following expression to bring back the previous days sales:

=sum({$<date = {"=$(=Date(max(date) -1))"}>} revenue)

However this is just returning the currently selected dates sales.

Any help appreciated (I am sure it something simple I just cannot see it!)

Cheers,

Andrew

3 Replies
nilesh_gangurde
Partner - Specialist
Partner - Specialist

Please Try this,

sum({$<date = {"$(=Date(max(date) -1))"}>} revenue)


Also check the date format and then have the same format within the double quotes.


-Nilesh

timsaddler
Creator III
Creator III

I've just been doing a similar thing

I set up variables for date ranges

Let  vTimeStart1 = Num(Today()-22);

Let vTimeStart2 = Num(Today()-9);

Then Expression as below :-

( {$< GLDate = {">=$(vTimeStart1) <=$(vTimeStart2)" }>} #SalesTns)

This might help

somenathroy
Creator III
Creator III

You may try with date format as:

=sum({<date = {'=$(=Date(max(date) -1,"DD/MM/YYYY"))'}>} revenue)


Date format(DD/MM/YYYY) should be as same as 'date' field has.


Regards,

Som