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

KPI Text Top 1

Hello team, I´m new in Qlik sense and I was wondering how to get the comment with the most votes from a table, that is, the top 1, if I choose KPI it only sends me numbers, but I want it to say the comment number 1

3 Replies
maxgro
MVP
MVP


T:
load * Inline [
Comment, Vote
aaaa,1
bbbb,1
cccc,1
aaaa,1
aaaa,1
bbbb,1
bbbb,1
aaaa,1
];

you can use this expression in the KPI 

Only({<Comment = {"=Rank(Sum(Vote),4)<=1"}>} Comment)

or this

FirstSortedValue(Comment, -Aggr(Sum(Vote), Comment))

 

maxgro_0-1671743959125.png

 

 

 

Jacobo
Contributor
Contributor
Author

Thanks the info comes like this...

maxgro
MVP
MVP

with your data

T2:
load * inline [
PARA DEJAR PIRELLI?
Jubilacion
Jubilacion
Jubilacion
Conflicto con mi supervisor actual
Otro
Mejor....
Conflicto interpersonal / ...
];

 

try this expression

Only({<[PARA DEJAR PIRELLI?] = {"=Rank(Count([PARA DEJAR PIRELLI?]),4)<=1"}>} [PARA DEJAR PIRELLI?])