Forum Discussion
sodec
3 years agoNew Member
DAX measure with left outer join, multiple to multiple
I have one table in data model with one row per employee, their current end previous manager, and their current and previous output: EmployeeID Current Manager Current Output Previous Manager ...
- 3 years ago
You can create measures like
Current Output Measure = SUM( 'Table'[Current Output]) Previous Output Measure = CALCULATE( SUM( 'Table'[Previous Output]), REMOVEFILTERS( 'Table'[Current Manager]), TREATAS( VALUES( 'Table'[Current Manager]), 'Table'[Previous Manager]) ) Delta = [Current Output Measure] - [Previous Output Measure]
johnt75
Super User
3 years agoYou can create measures like
Current Output Measure = SUM( 'Table'[Current Output])
Previous Output Measure =
CALCULATE(
SUM( 'Table'[Previous Output]),
REMOVEFILTERS( 'Table'[Current Manager]),
TREATAS( VALUES( 'Table'[Current Manager]), 'Table'[Previous Manager])
)
Delta = [Current Output Measure] - [Previous Output Measure]