Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I'm trying to create a column in a straight table for showing the market leader of a certain dimension.
In other words:
Dimension is Molecule, then I have the Molecule Sales (Sum(sales)), then I need the name of the Corporation which Rank(TOTAL <Molecule> Sum(sales)) = 1 and then this Corporation's Sales.
What I achieved so far is to show the market leader in a text object only when one molecule is selected, using this:
Only(
Aggr(
if(
Rank(TOTAL
Sum( IMP_VL_DEMAND_MTH)
) = 1,
Corporation
), Corporation
)
)
But this does not work in the straight table chart.
I've created an example (attached).
While selecting MolA, the straight table should display CorpH and the sales value of 918,98. This should happen without having to select the molecule.
Any ideas?
Try
Market Leader:
FirstSortedValue(Corporation,-Aggr(Sum(Sales),Molecule,Corporation))
Try
Market Leader:
FirstSortedValue(Corporation,-Aggr(Sum(Sales),Molecule,Corporation))
Works as a charm! Thanks a lot!
Used this for the market leader sales:
FirstSortedValue(Aggr(Sum(Sales),Molecule,Corporation),-Aggr(Sum(Sales),Molecule,Corporation))
>>"Used this for the market leader sales:"
I that case I think that
Max(Aggr(Sum(Sales),Molecule,Corporation)) should perform better
TRY THIS ONE.
FirstSortedValue(Corporation,-Aggr(Sum(Sales),Molecule,Corporation))