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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

KPI

Hi All,

storysubstory
story1substory1
story1substory2
story1substory3
story2substory1
story2substory3
story2substory2
story2substory4

i want story name in KPI front end. which is having max no. of sub stories.

Thanks & Regards

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this?

=FirstSortedValue(story, -Aggr(Count(substory), story))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

2 Replies
Anil_Babu_Samineni

Try this?

=FirstSortedValue(story, -Aggr(Count(substory), story))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

What would you want to see if two stories have same number of substories? Would you want to see one of them randomly? You can try this

=FirstSortedValue(DISTINCT story, -Aggr(Count(substory), story))

See both separated by comma?

=Concat(DISTINCT Aggr(If(Count(substory) = Max(TOTAL Aggr(Count(substory), story)), story), story))