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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AvalBuroAdmin
Regular Visitor

Create a Calculated Column using MAX value from another column of the same table

Hi everyone

I have the first 3 columns in this table (tblResources) and I need to create a calculated column (4th column)

IdPersonidResourceResourceCostMaxResourceCostbyPerson
Jhonrss0110002000
Jhonrss0519992000
Jhonrss0220002000
Peterrss0150005000
Peterrss0325005000

 

Wich Dax expression should i use to create the column MaxResourceCostbyPerson, every row should have the MAX value of ResourceCost for that IdPerson.

 

Hopefully someone can help me.

 

Rewards.

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@AvalBuroAdmin 

Add a New Column to your Table:

Column = 
CALCULATE(
    MAX(Table1[ResourceCost]),
    ALLEXCEPT(TABLE1,Table1[IdPerson])
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
Fowmy
Super User
Super User

@AvalBuroAdmin 

Add a New Column to your Table:

Column = 
CALCULATE(
    MAX(Table1[ResourceCost]),
    ALLEXCEPT(TABLE1,Table1[IdPerson])
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi, 

I was working on something similar but in my case 2000 for the first person, I want to display 2000 only against it and not the other values which are not the greatest. Something like this.

dPersonidResourceResourceCostMaxResourceCostbyPerson
Jhonrss011000 
Jhonrss051999 
Jhonrss0220002000
Peterrss0150005000
Peterrss032500 

Thanks, it worked.

AlexisOlson
Super User
Super User

There are many ways to do this but here's one option:

 

MaxResourceCostbyPerson =
CALCULATE (
    MAX ( TableName[ResourceCost] ),
    ALLEXCEPT ( TableName, TableName[IdPerson] )
)

Thanks so much.  It worked.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.