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.
Hi Hashmeet,
Thank you for reaching out to the Microsoft Fabric Community forum.
The approach you’ve implemented is almost close to the expected result, but for the filtered tables to reflect the slicer selections correctly, we recommend creating measures to apply the selected values from your slicers. This ensures the dynamic behavior you are expecting.
For your convenience, I’ve attached the PBIX file with the implemented solution. Please review it and let us know if there are any additional adjustments needed.
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
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:
- v-sgandrathi1 year agoCommunity Support
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.