We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
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 |
---|---|
62 | |
59 | |
46 | |
35 | |
31 |
User | Count |
---|---|
85 | |
71 | |
57 | |
51 | |
46 |