Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
jood_ahmad
Creator II
Creator II

One report contain two Different date

Dears, Can any one help on this;

i am new in NPrinting and i build report contains too many KPIs for the current date and my manager ask me in the same report he need the same data  for date -1 , i use the below formula to get all data in my report (for the max date in the main filter for my report)

sum(aggr(sum(ITEM_CONSUMPTION) * ( ITEM_PURCHASE_PRICE * UNIT_EQUIVALENCE) ,%Cons_Item_Key))

how can i get data for -1 date , when i try to do the same formula by use set analysis by add the SHIFTDATE={'$(=Max( SHIFTDATE)-1)'} it is not working,any idea pleas.

best regards.

Labels (1)
2 Replies
swuehl
Champion III
Champion III

Maybe just format your date

Dates in Set Analysis

SHIFTDATE={'$(=Date(Max( SHIFTDATE)-1))'}

assuming SHIFTDATE uses default date formatting.

You may need to apply the set analysis to the outer as well as the inner aggregation:

sum({<SHIFTDATE={'$(=Date(Max( SHIFTDATE)-1))'}>} aggr(sum({<SHIFTDATE={'$(=Date(Max( SHIFTDATE)-1))'}>} ITEM_CONSUMPTION) * ( ITEM_PURCHASE_PRICE * UNIT_EQUIVALENCE) ,%Cons_Item_Key))

jood_ahmad
Creator II
Creator II
Author

Thank you very much swuehl,

i try it but it is not work it give me zero no data retrieve .