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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
PauloRicardo
Advocate I
Advocate I

Subtracting the highest value for each value below to find the difference for each

Hi guys,

  In the same job position i have different salary, i already found the highest value (i used MAX). Now i need help finding how to subtract the highest value for each salary below to find the difference.

RoleNameFemale SalaryMale SalaryGoal
AdministrativeJulia2.350 0
AdministrativeRobert 2.150200
AdministrativeJohn 2.200150
AdministrativeSandra2.100 250
Total---------600


Any help?

2 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@PauloRicardo 

select role and name column , and unpivot other column in PQ

11.png12.PNG

 

then use DAX to create a column

 

Column = max('Table'[Value])-'Table'[Value]
13.PNG
 
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Anonymous
Not applicable

Hi @PauloRicardo ,

 

Thanks @ryan_mayu  for the quick reply and solution.


I have some other ideas for you to refer. We  can create a calculated column in Desktop.

SalaryGoal = 
var _1=MAX('Table'[Female Salary])
var _2=MAX('Table'[Male Salary])
var _max=IF(_1>=_2,_1,_2)
var _salary=[Female Salary]+[Male Salary]
RETURN _max-_salary

Then the result is as follows.

vtangjiemsft_0-1713423594164.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @PauloRicardo ,

 

Thanks @ryan_mayu  for the quick reply and solution.


I have some other ideas for you to refer. We  can create a calculated column in Desktop.

SalaryGoal = 
var _1=MAX('Table'[Female Salary])
var _2=MAX('Table'[Male Salary])
var _max=IF(_1>=_2,_1,_2)
var _salary=[Female Salary]+[Male Salary]
RETURN _max-_salary

Then the result is as follows.

vtangjiemsft_0-1713423594164.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

ryan_mayu
Super User
Super User

@PauloRicardo 

select role and name column , and unpivot other column in PQ

11.png12.PNG

 

then use DAX to create a column

 

Column = max('Table'[Value])-'Table'[Value]
13.PNG
 
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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