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.
Thank you, Sahasra, that helps!
I have created SelectedDate_First and SelectedDate_Second, and they are reflecting the dates selected in the slicer. However, when I pull the Date Extracted column into a table visual from Filtered_RawData_First and Filtered_RawData_Second, it still shows all the dates from Raw_data instead of only the selected ones.
Let me know if there’s anything I might have missed or if additional adjustments are needed.
Regards,
Hashmeet
Filtering_Data:
My Output:
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.