Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a data set like this.
Customer | rank | amount |
cust1 | 1 | 12 |
cust1 | 2 | 14 |
cust2 | 1 | 45 |
cust2 | 2 | 56 |
cust2 | 3 | 45 |
cust3 | 1 | 56 |
I want to make a chart to show
Customer | amount of highest rank |
cust1 | 14 |
cust2 | 45 |
cust3 | 56 |
for the amount column the expression is
sum({<rank={"$(=only(aggr(max(rank),customer)))"}>}amount)
but it is not working and giving me all zero values.
what am I missing here?
thanks.
HI @jduluc12
Try like below
Dim: Customer
Exp: Aggr(If(rank=Max(Total<Customer>rank),sum(amount)),Customer,rank)
there is a rank column in the data set.
so whichever amount has the highest rank, we need to show the amount of that
for example, cust2 has 3 rows with ranks 1, 2, and 3. so the chart should show the amount 45 for cust 2, which is the amount for rank 3.
I hope it is clear now.
HI @jduluc12
Try like below
Dim: Customer
Exp: Aggr(If(rank=Max(Total<Customer>rank),sum(amount)),Customer,rank)