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: 
avastani
Partner - Creator III
Partner - Creator III

Customer with Highest Total Sales

Hi,

Silly question. I used to be able to do this on the fly but stuck now.

I have the total Sales Amount for the customer group in my application, but would now like to report who that Customer Group is. How would I be able to do that?

Highest Total Sales by Customer Group is below:

Max(AGGR(SUM({<[Brand] = {X},[Fiscal Year] = {$(=Max([Fiscal Year]))},Source={Actual}>} [Sales]), [Customer Group]))

1 Reply
Anonymous
Not applicable

Try FirstSortedValue() fiunction, maybe this:

FirstSortedValue([Customer Group], -SUM({<[Brand] = {X},[Fiscal Year] = {$(=Max([Fiscal Year]))},Source={Actual}>} [Sales]))

"Minus" to sort in descending order.

Regards,

Michael