Forum Discussion
Values in Matrix shown based on different row context
- 6 years ago
Create a dimension table
Dim = distinct(table[A]) Or Dim = distinct(union(all(table[A]),all(table[B])))Join it both columns A and B, One join will be active. Another one will be inactive. use userelation to activate the join in the formula for column B
How to use userelation refer :https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
Check for terminations
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin - 6 years ago
Hi darwindat ,
Create a dimension table with distinct values from the Column A and Column B then make two inactive relationships between this new table and the two columns A and B then add the following two measures:
Contex A = CALCULATE(SUM('Table'[Value]); USERELATIONSHIP('Table'[Column A];'Row Context'[Column Context])) Contex B = CALCULATE(SUM('Table'[Value]); USERELATIONSHIP('Table'[Column B];'Row Context'[Column Context]))Add the column from the new table as your main context on your table and filter out all the blanks.
check PBIX file attach.
Create a dimension table
Dim = distinct(table[A])
Or
Dim = distinct(union(all(table[A]),all(table[B])))
Join it both columns A and B, One join will be active. Another one will be inactive. use userelation to activate the join in the formula for column B
How to use userelation refer :https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
Check for terminations
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin