Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
m_alsoby
Contributor III
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
MK_QSL
MVP
MVP

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

and

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

View solution in original post

4 Replies
lironbaram
Partner - Master III
Partner - Master III

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)

MK_QSL
MVP
MVP

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

and

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

m_alsoby
Contributor III
Contributor III
Author

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
Contributor III
Contributor III
Author

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

appreciate you help