Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max week as a calculated dimesion

Hi, guys!

I have a number of weeks in my file. For pivot table I want just the last week as a dimension.

Any suggestions how to do that?

1 Solution

Accepted Solutions
ramoncova06
Specialist III
Specialist III

if you want to use is as a dimension, then you need to use aggr

=aggr(max(WEEK),$Field)

though this is conditioned to how you date is set up so you might want change it to a date format something like date(your date&'-'year), so then it would be recognized as a number instead of a string

View solution in original post

7 Replies
MK_QSL
MVP
MVP

How is your week field? ie. normal week number of weekyear?

Use below

=Max(TOTAL {<Year= {'$(=Max(Year))'}>}Week)

Not applicable
Author

I just have dates as like DD-MMM as a week

rajkumarb
Creator II
Creator II

hi

you can use Week(max(field name))

Not applicable
Author

Hi, it's not working

rajkumarb
Creator II
Creator II

hI diana

=Max(WEEK(weekstart(date_field_name)))

MK_QSL
MVP
MVP

=Max(TOTAL {<Year= {'$(=Max(Year))'}>}(Date#(Week,'DD-MMM')))

ramoncova06
Specialist III
Specialist III

if you want to use is as a dimension, then you need to use aggr

=aggr(max(WEEK),$Field)

though this is conditioned to how you date is set up so you might want change it to a date format something like date(your date&'-'year), so then it would be recognized as a number instead of a string