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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max(total Period)

Hi,

I have 2 expressions for calculating sales

- one express sums the total sales of all periods selected: Sum(Sales)

- the other gives you just the total for the most recent period in the range of periods selected: sum(if(max(total Period) = Period,Sales))

They work fine and I want the second expression to have a custom name so that when the period range is selected the name includes the name of the latest period.

Our periods are numbers e.g. 11101 is July 2010 which is the first period in FY11, 11102 is August 2010, etc

the names for these numbers are on a list.

When I do the name formula I can get the period number but not the period name e.g. = max(total PeriodName) doesnt work but =max(total Period) will return a number

any ideas?

David

1 Reply
Not applicable
Author

Hi

Have you tried using the function firstsortedvalue? Something like this might work:
=firstsortedvalue(PeriodName, -Period)

regards
/Fredrik