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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max Month Name NOT Value

Hi guys and gals,

Below is the code I use to isolate the max value across 2 data sets. I want to point this to the month name now instead of the value. So instead of a max value of R500K, I want it to say Jun 2012. How do i do this

RangeMax(

Max(TOTAL aggr(sum({$<CalendarMonthAndYear={'>=$(v12MonthMin)<=$(v12MonthMax)'},CallType={'o'}>}Cost),CalendarMonthAndYear)),

Max(TOTAL aggr(sum({$<CalendarMonthAndYear={'>=$(v12MonthMin)<=$(v12MonthMax)'}>}HistoricCostTrendCost),CalendarMonthAndYear)))

Thanks,

Byron

1 Solution

Accepted Solutions
Not applicable
Author

When one persevers one finds an answer. For those that come across this post this is what I did

To get the frequency as an expression I used this formula

Max(aggr(count({$<CalendarMonthAndYear={'Nov 2012'},CallType={'o'},MAYAMobileCheck={'Maya'}>}Extn),CalendarMonthAndYear,Extn,Digits))

To get the extn responsible for that frequency I used this with a parameter and then suppressed nulls. Pretty much the same as the above expression just made to work as a dimension

aggr(if(Max(aggr(count({$<CalendarMonthAndYear={'Nov 2012'},CallType={'o'},MAYAMobileCheck={'Maya'}>}Extn),CalendarMonthAndYear,Extn,Digits))>30,Extn),CalendarMonthAndYear,Extn,Digits)

Hope this helps anyone out there looking for a similar solution. If anyone knows a better way please let me know

Cheers,

Byron

View solution in original post

4 Replies
sreenivas
Creator III
Creator III

Use MaxString

Not applicable
Author

I tried before and it gives value not name for some odd reason

Not applicable
Author

I am surprised no one knows how to do this. Comeon guys, one of you must be smart enough or logical enough to figure this one out. Help a fella and pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeee point me in the right direction

Cheers,

byron

Not applicable
Author

When one persevers one finds an answer. For those that come across this post this is what I did

To get the frequency as an expression I used this formula

Max(aggr(count({$<CalendarMonthAndYear={'Nov 2012'},CallType={'o'},MAYAMobileCheck={'Maya'}>}Extn),CalendarMonthAndYear,Extn,Digits))

To get the extn responsible for that frequency I used this with a parameter and then suppressed nulls. Pretty much the same as the above expression just made to work as a dimension

aggr(if(Max(aggr(count({$<CalendarMonthAndYear={'Nov 2012'},CallType={'o'},MAYAMobileCheck={'Maya'}>}Extn),CalendarMonthAndYear,Extn,Digits))>30,Extn),CalendarMonthAndYear,Extn,Digits)

Hope this helps anyone out there looking for a similar solution. If anyone knows a better way please let me know

Cheers,

Byron