Forum Discussion
DAX-SelectedValue
- 6 years ago
hi Nimai123
First, you should know that:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result in a visual.https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, you could use a measure with DATEDIFF too, that will give you same result in a visual too.
Regards,
Lin
You cannot do anything dynamic in a calculated column, but you can do in a calculated MEASURE. Try rewriting your formula as a measure instead of column (you may want to consider ITERATORS in this case such as SUMX)
Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos.
I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query.
- Nimai1236 years ago
Post Patron
My calculated Column = SelectedValue(Table[Date])
And I cannot make a measure because I am using this Calculated Column for a DATEDIFF.
- v-lili6-msft6 years ago
Community Support
hi Nimai123
First, you should know that:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result in a visual.https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, you could use a measure with DATEDIFF too, that will give you same result in a visual too.
Regards,
Lin