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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello!
I have a table that has the following structure:
ID | DAYS |
AAA | 3 |
AAA | 3 |
AAA | 5 |
BBB | 7 |
BBB | 7 |
CCC | 1 |
DDD | 9 |
DDD | 1 |
I want to create a new column that shows only the highest value of the DAYS column for each ID. The expected result would be like this:
ID | DAYS | NEW_COLUMN |
AAA | 3 | 5 |
AAA | 3 | 5 |
AAA | 5 | 5 |
BBB | 7 | 7 |
BBB | 7 | 7 |
CCC | 1 | 1 |
DDD | 9 | 9 |
DDD | 1 | 9 |
How can I do this?
Solved! Go to Solution.
Hi @nok ,
Create a new column in your table with this DAX formula:
NEW_COLUMN =
CALCULATE(
MAX('Table'[DAYS]),
ALLEXCEPT('Table', 'Table'[ID])
)
If this reply help you, please consider as solution and please give a kudo.
Thank you
Hi @nok ,
Create a new column in your table with this DAX formula:
NEW_COLUMN =
CALCULATE(
MAX('Table'[DAYS]),
ALLEXCEPT('Table', 'Table'[ID])
)
If this reply help you, please consider as solution and please give a kudo.
Thank you