Forum Discussion
Pick highest value by ID
Hello,
I have a sample table as follows :
| Client | ID | Value |
| A | 123 | 50 |
| A | 123 | 90 |
| B | 000 | 70 |
| B | 000 | 100 |
I want a table that returns
Client Value
A 90
B 100
Thanks in advance,
Hi, Adnane_k
You can try the following methods:
- Create a new calculation column to calculate the maximum value of each group of clients, and the results are shown in the figure:
Max Value = CALCULATE( MAX([Value]), FILTER( 'Table', 'Table'[Client] = EARLIER('Table'[Client]) ) )- When creating a visual, the selection of measures is not summed, and the results are as shown in the figure:
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- Jihwan_Kim
Super User
Hi,
Please check the below picture for creating a new table.
New Table =GROUPBY ('Table','Table'[Client],"@MaxValue", MAXX ( CURRENTGROUP (), 'Table'[Value] ))- AnonymousNot applicable
Hello, thank you for your answer but I don't want to create a new table. Also it doesn't give the correct values
- AnonymousNot applicable
Hi Anonymous
Create a measure for this:
Max_grp = CALCULATE(MAX(Table[Value]),ALLEXCEPT(Table,Table[Client]))And then drag the Client column and the above measure to get the desired result.
Thanks
Raj
- AnonymousNot applicable
Hello , it doesn't work. Maybe because in my real data I have 20 other columns and use "fiscal year" in the slicer.
- v-zhangti
Community Support
Hi, Adnane_k
You can try the following methods:
- Create a new calculation column to calculate the maximum value of each group of clients, and the results are shown in the figure:
Max Value = CALCULATE( MAX([Value]), FILTER( 'Table', 'Table'[Client] = EARLIER('Table'[Client]) ) )- When creating a visual, the selection of measures is not summed, and the results are as shown in the figure:
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.