Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
aaronnayan
Creator III
Creator III

Set Analysis Question

Hi Guys,

Really quick

i have a KPI :

max(aggr($(vMargin),[CustomerName]))

Which gives the value £

I want to get the Name 'String'of the customer with the most Margin?

Thanks

11 Replies
aaronnayan
Creator III
Creator III
Author

i can confirm this was the result

No Max was needed!!!

=firstsortedvalue([Customer Name], -aggr($(vMargin),[Customer Name]))

vishsaggi
Champion III
Champion III

Try this?

= Firstsortedvalue([CustomerName], -aggr(RangeSum(sum({<SInvoiceCount = {1}>} [Marginlcc]), sum({<SCreditC = {1}>} [Marginlcc])), [CustomerName]))

Also check when you use this variable in a textbox are you seeing any value?

Once you confirm you are seeing values. We can implement using variable. Let us know.

With variable try like

= Firstsortedvalue([CustomerName], -aggr($(vMargin), [CustomerName]))