Forum Discussion
Change Measures used based on Slicer Selection
- Anonymous1 year ago
Hi bburzanko3 ,
I'm not sure how your dataset is designed, here is my sample.The data table is as follows.
Create the following measure for dynamic switching of savings.
SelectedYearSavings = VAR SelectedYear = CALCULATE ( SELECTEDVALUE ( 'Table'[Year] ), ALLSELECTED () ) RETURN SWITCH ( SelectedYear, 2024, [2024 Savings], 2025, [2025 Savings] )
The final resutl is as follows. Hopefully it will meet your needs.
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
No Savings wont be the only measure that changes. For example there will also be a "Target" field which would be based off of "2024 Target" and "2025 Target"
The goal would be when i toggle between the different "Year Selections" the measures would change appropriately.
I was thinking for each measure i would have a formula on back saying if 2024 then "2024 measure", if 2025 "2025 measure" and so on.