Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
per analogy :
='Customer with the most Sales : '&firstsortedvalue (customer, -aggr( sum(sales),customer))
result :
maybe:
=firstsortedvalue ([CustomerName], -aggr( max($(vMargin)),[CustomerName]))
or
=firstsortedvalue ([CustomerName], -max(aggr($(vMargin),[CustomerName])))
per analogy :
='Customer with the most Sales : '&firstsortedvalue (customer, -aggr( sum(sales),customer))
result :
Hi Omar its coming back with a null value
Both are not working. Maybe becuase of the variable?
what's in the variable?
I have changed the name of the fields for security
sum({<SInvoiceCount = {1}>} [Marginlcc]) + sum({<SCreditC = {1}>} [Marginlcc])
hi,
you have a mistake in the formula:
sum({<SInvoiceCount = {1}>} [Marginlcc]]) + sum({<SCreditC = {1}>} [Marginlcc])
hope it helps,
Andrew
No andrew thanks for spotting that i changed it due to security
The variable works fine on its own
What if u put the expression in ur variable directly in mine?
It works?