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!View all the Fabric Data Days sessions on demand. View schedule
Hello,
I have this table in a PowerBI file:
| Id | Code | Description | Value |
| 1 | C1 | D1 | Value1 |
| 2 | C1 | D2 | Value2 |
| 3 | C1 | D3 | Value3 |
| 4 | C1 | D4 | X |
| 5 | C2 | D1 | Value5 |
| 6 | C2 | D2 | Value6 |
| 7 | C2 | D3 | Value7 |
| 8 | C2 | D4 | Y |
| 9 | C3 | D1 | Value9 |
| 10 | C3 | D2 | Value10 |
| 11 | C3 | D3 | Value11 |
| 12 | C3 | D4 | Y |
| 13 | C4 | D1 | Value12 |
| 14 | C4 | D2 | Value13 |
| 15 | C4 | D3 | Value8 |
| 16 | C4 | D4 | X |
| 17 | C5 | D1 | Value16 |
| 18 | C5 | D2 | Value17 |
| 19 | C5 | D3 | Value4 |
| 20 | C5 | D4 | Y |
And I need a new column that have the D4 value of the Description column for each group of Code column, like this:
| Id | Code | Description | Value | NewColumn |
| 1 | C1 | D1 | Value1 | X |
| 2 | C1 | D2 | Value2 | X |
| 3 | C1 | D3 | Value3 | X |
| 4 | C1 | D4 | X | X |
| 5 | C2 | D1 | Value5 | Y |
| 6 | C2 | D2 | Value6 | Y |
| 7 | C2 | D3 | Value7 | Y |
| 8 | C2 | D4 | Y | Y |
| 9 | C3 | D1 | Value9 | Y |
| 10 | C3 | D2 | Value10 | Y |
| 11 | C3 | D3 | Value11 | Y |
| 12 | C3 | D4 | Y | Y |
| 13 | C4 | D1 | Value12 | X |
| 14 | C4 | D2 | Value13 | X |
| 15 | C4 | D3 | Value8 | X |
| 16 | C4 | D4 | X | X |
| 17 | C5 | D1 | Value16 | Y |
| 18 | C5 | D2 | Value17 | Y |
| 19 | C5 | D3 | Value4 | Y |
| 20 | C5 | D4 | Y | Y |
Which formula have I to make for this new column?
Thanks!!!!
Solved! Go to Solution.
Hi @Raul
I think this column might be close. Just chage where I have Table4 to be the name of your table.
NewColumn = CALCULATE(
MAX('Table4'[Value]),
FILTER(
ALLEXCEPT(
'Table4',
Table4[Code]
),
[Description]="D4"
)
)
Hi @Raul
I think this column might be close. Just chage where I have Table4 to be the name of your table.
NewColumn = CALCULATE(
MAX('Table4'[Value]),
FILTER(
ALLEXCEPT(
'Table4',
Table4[Code]
),
[Description]="D4"
)
)
Thanks a lot!!
Works perfectly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!