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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need max Week level data which is available for the current quarter.

Hi,

I Have the filter Year,Quarter,Weeks(1 to 13 per quarter)

For the Q1 i have 13 weeks of data so it is dipalying data properly,for Q2 is currently  having  the data of 7 weeks.

If i select Q2 with the below conditon it is shoing No data to display..Because its looking for MaX WEEK and Last week -1 .For the same

13 th and 12th week data is not available for Q2.Data is available till 7 th week.

(SUM({<WeekKeyNumber={$(=MAX(WeekKeyNumber))},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales)-

SUM({<WeekKeyNumber={$(=MAX(WeekKeyNumber)-1)},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales))

if i select Quarter and 7 th week in filter i'm getting the proper count.if i dont select any Week it is giving No data to Dispaly.

Need assistance.

InAdvacne

Thank you

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try:

(SUM({<WeekKeyNumber={"$(=MAX({<Sales={'>0'}>}WeekKeyNumber))"},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales)-

SUM({<WeekKeyNumber={"$(=MAX({<Sales={'>0'}>} WeekKeyNumber)-1)"},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales))

View solution in original post

3 Replies
tresesco
MVP
MVP

Try putting double quotes like:

(SUM({<WeekKeyNumber={"$(=MAX(WeekKeyNumber))"},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales)-

SUM({<WeekKeyNumber={"$(=MAX(WeekKeyNumber)-1)"},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales))

Anonymous
Not applicable
Author


I tried the same but no luck.Any alternate for the same.Any Suggestions over here

tresesco
MVP
MVP

Try:

(SUM({<WeekKeyNumber={"$(=MAX({<Sales={'>0'}>}WeekKeyNumber))"},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales)-

SUM({<WeekKeyNumber={"$(=MAX({<Sales={'>0'}>} WeekKeyNumber)-1)"},WeekKey=,FinancialYear=,FiscalQuarter=,PostingDate=,WKey=>}Sales))