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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
karthikdaibala
Contributor
Contributor

Firstsorted value and its count in the same table

Hi Everyone,

Could someone please help me. As i am trying to get the firstsorted value for each dimensions and use the firstsorted value to count no of IDs.

For example:

CountryTop CityCustomers at Top CityTotal Customers
AustraliaSydney12002000
AmericaNew York14003000

I got Top City using First sorted value =

For example: FirstSortedValue(city_name, (-(Aggr(count(ID), Country, city_name))))

but i want to calculate the Customers at that City by using above expression, as i cant use If condition as we have many countries.

Thanks in advance.

Karthik

Labels (1)
1 Reply
sunny_talwar
MVP
MVP

Try this:

Max(Aggr(Count(ID), Country, city_name)