Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Only show specific Data in Table

Hello Community,

I have the following problem with a table Diagramm.

I got different collumns with a Costumer,  ID (for the Product he bought), and the Price. Each Costumer could have bought more Products, so there is a new line for every Product

CostumerIDPrice
Shaun Williams55400
Shaun Williams66500
Shaun Williams77300
Maria Franklin11777
Maria Franklin22200
Maria Franklin33350
Maria Franklin44378
Maria Franklin55400
Maria Franklin66500
Albert Einstein1152
Albert Einstein13757

Now, I want to make a table, where only the most expensive Product is listed the costumer bought.

Costumer
IDPrice
Shaun Williams66500
Maria Franklin11777
Albert Einstein13757

I tried to set the Dimension Costumer and the Functions:

If(rank(Price)=1,ID,Null())

Aggr(If(rank(Price)=1,Price),Price)

But then I only get a table, where everything is Null() except for the highest Price in the Data.

How can I filter the Data so that every Costumer is listed like in the second table?

Thanks a lot in advance!

Alex

1 Solution

Accepted Solutions
Not applicable
Author

So,

use Costumer and ID as dimensions

and expression:

if(Price=max(TOTAL <Costumer> Price),Price)

View solution in original post

5 Replies
Not applicable
Author

What you want to do if you will have more than one product with this max price for each customer?

Not applicable
Author

Hey Dariusz,

if there are more products with a max price, than there should be an extra row or more if needed.

satishkurra
Specialist II
Specialist II

Use the below expression:

=if(Aggr(Rank(Sum(Price)), Costumer) =1 , Costumer)

Not applicable
Author

So,

use Costumer and ID as dimensions

and expression:

if(Price=max(TOTAL <Costumer> Price),Price)

Not applicable
Author

Thanks a lot for your Help Dariusz, it works