Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FirstSortedValue() in set Analysis Issue

Hi,

i have a table with City Dimension and want to know the top Vendor according to TRADE_VALUE and  distinct loaction_ID count of that Vendor ,

i am able to find the top vendor with help of firstSortedvalue().

now i want pass this function into set analysis and get the city wise distinct LOCATION_ID COUNT.

Below is the expression what i have written, but not getting the right result.

=count( {<VENDORSHORTNAME={"$(=FirstSortedValue(VENDORSHORTNAME,-Aggr(Sum(TRADE_VALUE),VENDORSHORTNAME,CITY)))"}>}DISTINCT LOCATIONID)

if you see the image closely the second record showing '0' but there are loaction_Id associated with that,

Kindly help

ci.png

1 Reply
MK_QSL
MVP
MVP

Please provide sample data.