Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for
Did you mean:  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

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

and

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

4 Replies  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)  MVP

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

and

SUM({<TRANSACTION_DATE = {'\$(=Date(Max(TRANSACTION_DATE)-1))'}>}SALES)  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   thanks a lot dear i got it now this issue has been solved  