Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to get the Max Month in Set analysis
Table Format
HPA Month Series Value
December 123 4578
December 456 6735
November 789 8567
November 657 7894
November 876 6504
October 345 7867
Sum({<[HPA Month]={'$(=MaxString([HPA Month]))'}>} Value)
I took the same code but I am not getting the value instead of December value I am getting the October value
Please help me with how to get the December value
I tried with all the below mentioned codes
Sum({<[HPA Month]={'$(=MaxString([HPA Month]))'}>} Value)
Sum({<[HPA Month]={$(=MaxString([HPA Month]))}>} Value)
Sum({<[HPA Month]={$(=Max([HPA Month]))}>} Value)
Sum({<[HPA Month]={'$(=Max([HPA Month]))'}>} Value)
Hi @varma8998
I think the problem is that your [HPA Month] is being evaluated as text and there is no way for Qlik to know the ranking of text. You first need to convert it to a month using Date#(), evaluate it using Max() to get the highest one and then format it as a month using Date(). This should work:
Sum({<[HPA Month]={'$(=Date(Max(Date#([HPA Month],'MMMM')),'MMMM'))'}>} Value)
Hope this helps.
Regards,
Mauritz
Try like:
Sum({<[HPA Month]={'$(=Date(Max(Date#([HPA Month], 'MMMM')), 'MMMM'))'}>} Value)
Hi @varma8998
I think the problem is that your [HPA Month] is being evaluated as text and there is no way for Qlik to know the ranking of text. You first need to convert it to a month using Date#(), evaluate it using Max() to get the highest one and then format it as a month using Date(). This should work:
Sum({<[HPA Month]={'$(=Date(Max(Date#([HPA Month],'MMMM')),'MMMM'))'}>} Value)
Hope this helps.
Regards,
Mauritz
Try like:
Sum({<[HPA Month]={'$(=Date(Max(Date#([HPA Month], 'MMMM')), 'MMMM'))'}>} Value)