Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
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,