Forum Discussion
Dynamic Column calculation based on Slicer Selection
- 10 years ago
Calculated columns are initialized regardless of Slicers.
If you'd like to filter your data via the selected value in a slicer, instead of a calcualted column, use a measure as below to filter in DAX.
selectedValue = IF ( ISFILTERED ( FILTERTABLE[Value] ) && HASONEVALUE ( FILTERTABLE[Value] ), LASTNONBLANK ( FILTERTABLE[Value], 0 ), "a default value" )
Hi Kam,
I am somehow not able to get this to work. I have the Date table, also the DatePeriod table now. I joined Date to DatePeriod (1-many). And my Calls table to Date (many to one). My slicer is based on DatePeriod and shows the Last Month etc. fine. It even shows the corresponding (correct) data from Date table (in a table visual with just the Date and DatePeriod fields).
However, somehow my other visuals don't get that filter from slicer. Is it because the Calls are not directly related to the DatePeriod (they are connected via Date table). Thanks for your help.
HI Anonymous
Apologies for the late reply , Assuming you have used to the same naming convention as I have in the example the slicer should be based on Sales Period
If you still have issues , are you able to share an example file ?
cheers
Kam