Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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)
User | Count |
---|---|
99 | |
86 | |
80 | |
76 | |
71 |
User | Count |
---|---|
112 | |
105 | |
96 | |
74 | |
66 |