Forum Discussion
create a new % Change column to compare values based on multiple slicers including on the same field
- 4 years ago
Hi Anonymous ,
Do you have two watches? A fact table and a prediction table or a prediction and a fact table in the same table?
Assume that they are in the same table. You need create a new table for the second year slicer. Then use the following measure to do calculate %:Measurde = VAR _1 = CALCULATE ( SUM ( 'Table'[values] ), FILTER ( ALL ( 'Table'[year] ), [year] = SELECTEDVALUE ( 'Year'[year] ) ) ) RETURN IF ( ISBLANK ( SELECTEDVALUE ( 'Year'[year] ) ), "please select one", FORMAT ( DIVIDE ( _1 - SUM ( 'Table'[values] ), SUM ( 'Table'[values] ) ), "#.0%" ) )Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Do you have two watches? A fact table and a prediction table or a prediction and a fact table in the same table?
Assume that they are in the same table. You need create a new table for the second year slicer. Then use the following measure to do calculate %:
Measurde =
VAR _1 =
CALCULATE (
SUM ( 'Table'[values] ),
FILTER ( ALL ( 'Table'[year] ), [year] = SELECTEDVALUE ( 'Year'[year] ) )
)
RETURN
IF (
ISBLANK ( SELECTEDVALUE ( 'Year'[year] ) ),
"please select one",
FORMAT (
DIVIDE ( _1 - SUM ( 'Table'[values] ), SUM ( 'Table'[values] ) ),
"#.0%"
)
)
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.