Forum Discussion
Indices calculation with dynamic variable
- 3 years ago
Hey Anonymous,
One solution I will try is to have multiple columns calculated based on the years range and use a DAX measure to select the appropriate column to display based on the year selected but it will need to be unlinked from everything else.
VAR Yearbase = 2018My intention, originally, was to have this number to be variable and not fixed.
Thanks for the feedback, I will leave the topic open for a couple of weeks and then accept your solution if nothing better shows up!
Hey Anonymous,
One solution I will try is to have multiple columns calculated based on the years range and use a DAX measure to select the appropriate column to display based on the year selected but it will need to be unlinked from everything else.
VAR Yearbase = 2018My intention, originally, was to have this number to be variable and not fixed.
Thanks for the feedback, I will leave the topic open for a couple of weeks and then accept your solution if nothing better shows up!
Hi breeze87 ,
Calculated columns are not dynamically aware of slicer filtering, try changing to a measure. and create a year table, create a slicer with the year table, change the variable to var Yearbase=selectedcolumn('for slicer',"Year",[Year]), and change the filter in the measure to FILTER( f_Feedstocks, f_Feedstocks[Year] In Yearbase ).
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.