Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

m_alsoby
New Contributor III

SET ANALYSIS yesterday sales with selected day

Gents,

Greetings,

Looking to use Set Analysis to have a dynamic variable  for date field to retrieve yesterday [of the selected day] sales.

my Fields are :

1- TRANSACTION_DATE (For Date)

2- SALES (For Sales) 

and I use IF condition for retrieve a specific category of sales already do it.


I tried many statements some them gave Zero values and some Gave me -

Sum({$<TRANSACTION_DATE={'MAX(TRANSACTION_DATE) -1'}>}SALES)

Sum({TRANSACTION_DATE={"$(vToDate)"}} SALES

     

kindly help me to find the Solution for that

1 Solution

Accepted Solutions
MVP
MVP

Re: SET ANALYSIS yesterday sales with selected day

SUM({<TRANSACTION_DATE = {'$(=Date(Max(TRANSACTION_DATE)))'}>}SALES)

and

SUM({<TRANSACTION_DATE = {'$(=Date(Max(TRANSACTION_DATE)-1))'}>}SALES)

4 Replies
lironbaram
Honored Contributor II

Re: SET ANALYSIS yesterday sales with selected day

hi

try this

Sum({$<TRANSACTION_DATE={'$(=MAX(TRANSACTION_DATE) -1)'}>}SALES)

if this doesn't work

try this , it's important that you'll use exactly the same date format as TRANSACTION_DATE format

Sum({$<TRANSACTION_DATE={'$(=date(MAX(TRANSACTION_DATE) -1,'DD/MM/YYYY'))'}>}SALES)

MVP
MVP

Re: SET ANALYSIS yesterday sales with selected day

SUM({<TRANSACTION_DATE = {'$(=Date(Max(TRANSACTION_DATE)))'}>}SALES)

and

SUM({<TRANSACTION_DATE = {'$(=Date(Max(TRANSACTION_DATE)-1))'}>}SALES)

m_alsoby
New Contributor III

Re: SET ANALYSIS yesterday sales with selected day

thanks Dears lironbaram‌‌ and Manish,

both of your suggestions are working probably without select a specific date but once i select a date the value will be Zero and I'm sure this field contain value and absolutely not zero

any suggestions from your End about this issue ? 

m_alsoby
New Contributor III

Re: SET ANALYSIS yesterday sales with selected day

thanks a lot dear i got it now this issue has been solved

appreciate you help 

Community Browser