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.
Greetings,
I have a table with employee number , old salary and new salary. I want to calculate the percentage increase of the employees salary , any guidance please on how to create the measure for this ?
Solved! Go to Solution.
Create Measure, copy in the following, Ensure you update table name and column name if needed.
b % difference from a =
VAR __BASELINE_VALUE = SUM('Table Name'[Max of OLD_PROPOSED_SALARY_N])
VAR __VALUE_TO_COMPARE = SUM('Table Name'[Max of PROPOSED_SALARY_N])
RETURN
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
it depends on your data model. for example, do you have dates in your table?
in the most common case you can create a measure
Measure =
DIVIDE(
CALCULATE(MAX(Table[Salary]), ALLEXCEPT(Table, Table[EMPLOYEE_NUMBER]) ),
CALCULATE(MIN(Table[Salary]), ALLEXCEPT(Table, Table[EMPLOYEE_NUMBER]) )
)
- 1
it depends on your data model. for example, do you have dates in your table?
in the most common case you can create a measure
Measure =
DIVIDE(
CALCULATE(MAX(Table[Salary]), ALLEXCEPT(Table, Table[EMPLOYEE_NUMBER]) ),
CALCULATE(MIN(Table[Salary]), ALLEXCEPT(Table, Table[EMPLOYEE_NUMBER]) )
)
- 1
Create Measure, copy in the following, Ensure you update table name and column name if needed.
b % difference from a =
VAR __BASELINE_VALUE = SUM('Table Name'[Max of OLD_PROPOSED_SALARY_N])
VAR __VALUE_TO_COMPARE = SUM('Table Name'[Max of PROPOSED_SALARY_N])
RETURN
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
142 | |
105 | |
103 | |
85 | |
70 |