Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have create a below table in Power BI. I need to get max region value for each Id.
Below is the DAX I am using to cretae a table in Power BI:
I need to add one more clause which should return max region for each Id.
In case of Id 2 there are two rows, I need to get only one row with Max region value. So the output should be:
| Id | Region |
| 1 | APAC |
| 2 | EMEA |
| 3 | NAMER |
Can anyone please help me on that?
Thanks!
Solved! Go to Solution.
Not sure how you are calculating your "max" but here is a table expression that gets your desired result from your example table. This one determines max alphabetically, but you can substitute in another expression inside the CALCULATE if that is not correct.
Main Summary =
ADDCOLUMNS (
SUMMARIZE ( Main, Main[Id] ),
"Region", CALCULATE ( MAX ( Main[Region] ) )
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @mahoneypat , @amitchandak ,
Thank you so much for your reply!
I tried the below expression and it works perfect.
Hi @mahoneypat , @amitchandak ,
Thank you so much for your reply!
I tried the below expression and it works perfect.
Not sure how you are calculating your "max" but here is a table expression that gets your desired result from your example table. This one determines max alphabetically, but you can substitute in another expression inside the CALCULATE if that is not correct.
Main Summary =
ADDCOLUMNS (
SUMMARIZE ( Main, Main[Id] ),
"Region", CALCULATE ( MAX ( Main[Region] ) )
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Try using the DISTINCT function. After SUMMARIZE, DISTINCT (Main (ID).
maybe work
Hi @marceloVVR ,
Thanks for the reply!
I need to select max region for each id. Using distinct it would be difficult to achieve the desire record.
Thanks,
Rinku
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |