March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
Role | Name | Female Salary | Male Salary | Goal |
Administrative | Julia | 2.350 | 0 | |
Administrative | Robert | 2.150 | 200 | |
Administrative | John | 2.200 | 150 | |
Administrative | Sandra | 2.100 | 250 | |
Total | --- | --- | --- | 600 |
Any help?
Solved! Go to Solution.
select role and name column , and unpivot other column in PQ
then use DAX to create a column
Proud to be a Super User!
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.
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.
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.
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.
select role and name column , and unpivot other column in PQ
then use DAX to create a column
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |