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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors