Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
103 | |
98 | |
98 | |
38 | |
37 |
User | Count |
---|---|
152 | |
121 | |
73 | |
71 | |
63 |