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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
wiz_nerd
Creator
Creator

Max week or max week minus number as dimension?

I have Week-year, week and year field I want to use in calculated dimension in two ways.

1 to get the max week and max year and second to get max week -n week and max year.

My Table Looks like this:

Week-yearWeekYearValue
52-20205220201
52-20205220202
51-20205120203
42-20204220204
52-20195220195
52-20195220196
51-20195120197
42-20194220198

 

Output 1:

Week-yearWeekYearValue
52-20205220201
52-20205220202

 

Output 2(Max week minus Nweek):

Week-yearWeekYearValue
51-20205120203
Labels (1)
1 Solution

Accepted Solutions
wiz_nerd
Creator
Creator
Author

=(Max(TOTAL {<field_Year= {'2020'}>}Field_Week))-6

View solution in original post

1 Reply
wiz_nerd
Creator
Creator
Author

=(Max(TOTAL {<field_Year= {'2020'}>}Field_Week))-6