Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |