Forum Discussion
Anonymous
6 years agoNot applicable
Need help - Column difference in a matrix
Good afternoon all! I'm in dire need of some help. I have the following matrix making use of 3 fields: Description Period Cost My issue is the following, i want to add a column...
- 6 years ago
Hi Anonymous
Create measures
Measure 2 = VAR m1 = MINX ( ALLSELECTED ( 'Table 2' ), [period] ) VAR m2 = MAXX ( ALLSELECTED ( 'Table 2' ), [period] ) RETURN CALCULATE ( SUM ( 'Table 2'[cost] ), FILTER ( 'Table 2', 'Table 2'[period] = m2 ) ) - CALCULATE ( SUM ( 'Table 2'[cost] ), FILTER ( 'Table 2', 'Table 2'[period] = m1 ) ) Measure = IF(ISINSCOPE('Table 2'[period]),SUM('Table 2'[cost]),[Measure 2])Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
6 years agoCommunity Support
Hi Anonymous
Create measures
Measure 2 =
VAR m1 =
MINX (
ALLSELECTED ( 'Table 2' ),
[period]
)
VAR m2 =
MAXX (
ALLSELECTED ( 'Table 2' ),
[period]
)
RETURN
CALCULATE (
SUM ( 'Table 2'[cost] ),
FILTER (
'Table 2',
'Table 2'[period] = m2
)
)
- CALCULATE (
SUM ( 'Table 2'[cost] ),
FILTER (
'Table 2',
'Table 2'[period] = m1
)
)
Measure = IF(ISINSCOPE('Table 2'[period]),SUM('Table 2'[cost]),[Measure 2])
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
thank you very much! Works like a charm!
thanks to everyone else who also gave inputs and solutions.
appreciate it!