Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gr_eldred
Creator II
Creator II

Show week of previous year

good day

I need your help to show the week of the previous year to which you select

That is to say in this year 2017 I am in week 30. I need to bring the week 30 of the year 2016.

Can anybody help me? Greetings.

4 Replies
sunny_talwar

May be like this

Sum({<Year = {$(=Max(Year) - 1)}>}Measure)

Anil_Babu_Samineni

May be use this?

Sum({<Week = {'$(=Max(Week))'}, Year = {'$(=Max(Year-1))'}>} Sales)

OR

Sum({<Week = {'$(=Max(Week))'}, Year = {'$(=AddYears(Max(Year),-1))'}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
gr_eldred
Creator II
Creator II
Author

good day

   Today I am in the week 30 of 2017 and the year before (2016) had 53 weeks I need to bring only the week 30 of the year 2016 if I leave the max would bring me the highest week that was the 53

Anil_Babu_Samineni

May be this?

Sum({<Week = {"Week = Week(Today())"}, Year = {'$(=Max(Year-1))'}>} Sales)


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful