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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
lalitkgehlot89
Partner - Creator II
Partner - Creator II

Logic help related to Current Week Vs last Year Week.

Hi,

In Sample data I have three Fields, Storeid, Date & Sales Amount.

I want to make a Straight table which show sales data of current week and last year same week sales data.

And first week should be from 1Jan and after that secound,third,fourth... should be start from Monday.

for more reference data given in weekcal file.

Please help me out to create the logic for the same.

Thanks,

Lalit Kumar

11 Replies
lalitkgehlot89
Partner - Creator II
Partner - Creator II
Author

This one will not work on next week.

avkeep01
Partner - Specialist
Partner - Specialist

Yes, you would make week={48} dynamically.

2 examples:

- SUM({$<_CurrentYear={1},Week={$(=MAX(Week))}>} Amount)  // based on selection

- Create variable: vWeek = MAX(Week)

  SUM({$<_LastYear={1},Week={$(vWeek)}>} Amount).