Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
SudharshanK
Contributor III
Contributor III

Get second max value of a text value

How to get the second max value of a string? I am able to get the maximum value of selected values through this function:

maxstring(total <Field>)

 

Labels (1)
  • SaaS

5 Replies
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @SudharshanK 

I guess you could try 

maxstring({< field=-{“$(=maxstring(total field))”} >}field)

 

hope this helps.

best,

SudharshanK
Contributor III
Contributor III
Author

I tried this its not working

RafaelBarrios
Partner - Specialist
Partner - Specialist

hi @SudharshanK 

I put the '-' sign in the wrong place

should be:

maxstring({< field-={"$(=maxstring(total field))"} >}field)

for example, if i dont have any selection

RafaelBarrios_0-1664983956546.png

 

and on selection

RafaelBarrios_1-1664984019759.png

 

hope this one works.

best,

SudharshanK
Contributor III
Contributor III
Author

The end users did not want the metrics for the previous months so I did not have to do this calculation after all. Thanks for helping me out.

RafaelBarrios
Partner - Specialist
Partner - Specialist

Well, that happens many times

If the proposed solution solves the original problem, it would be nice if you accept it as a solution.

Best,