Forum Discussion
Calculating Differences between employees depending on hierachy level
Hi UK06B1 ,
You can create a measure.
IF (
ISFILTERED ( Employee[EmployeeID] ),
CALCULATE([STDEVP.1_Remuneration],ALL(Employee[EmployeeID])) - SUM(Remuneration),
IF (
ISFILTERED ( Employee[TeamID] ),
CALCULATE([STDEVP.1_Remuneration],ALL(Employee[TeamID]))- SUM(Remuneration),
IF (
ISFILTERED ( Employee[DeptID] ),
CALCULATE([STDEVP.1_Remuneration],ALL(Employee[DeptID]))- SUM(Remuneration),
IF (
ISFILTERED ( Employee[ClientID]),
CALCULATE([STDEVP.1_Remuneration],ALL(Employee[ClientID]))- SUM(Remuneration)
)
)
)
You can refer to the following documents that may be helpful to you:
matrix - How to calculate based on different levels of a hierarchy - Power BI - Stack Overflow
Clever Hierarchy Handling in DAX - SQLBI
Solved: Transfers In Count in different hierachies - Microsoft Power BI Community
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
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.
- UK06B13 years ago
Helper II
Thanks alot Neeko Tang i will take a look at what you ahve suggested and get back to you if i am still unable to work it out. regards.
- Anonymous3 years agoNot applicable
Hi UK06B1 ,
Has your problem been solved? If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out. Thanks in advance.
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.
- UK06B13 years ago
Helper II
Hello Neeko Tang, apologies for the delay i struggled to get the solution to achieve what i required (i think this is an issue with my capability rather than your solution). In the end i was able to achieve the result i needed by creating 2 tables and a calculated column in one of the data sets. I appreciate you help though.