Forum Discussion
Dynamic Filtering Data Using Date Slicers and DAX Queries
- 1 year ago
Hi Hashmeet,
You haven’t missed anything; the key adjustment is replacing the calculated columns with measures. The output you’re observing was happening because Calculated columns, like we created (Filtered_RawData_First and Filtered_RawData_Second), are static. They are evaluated at the time of data refresh and do not dynamically respond to slicers or other visual filters. This is why the table visual continues to display all dates from your Raw_Data.
To achieve the result, I suggest using measures( SelectedDate_First and SelectedDate_Second) instead of calculated columns. By using these measures in your table visual, the results will now adapt to any slicers applied.
If you need any further suggestions, please let us know. If this post clarifies your doubt, please give us Kudos and consider marking Accepting it as a solution to guide other members in finding it more easily.
Best Regards,
Sahasra.
Hashmeet , Calculated table and Calculated column, can not take slicer value. They are calculated at load time and static after that.
Only measure can take slicer value. Cosider measure for you need
example
CALCULATE(Countrows( Raw_Data) , USERELATIONSHIP('Second Date Filter'[Date Extracted], Raw_Data[Date Extracted]) )