Forum Discussion
Calendar slicer problem
- Anonymous1 year ago
Hi TaoW ,
The built-in date hierarchy, which is automatically generated by Power BI, breaks down date fields into year, quarter, month, and day hierarchies. This hierarchy may cause filters to behave less than expected in some cases. Specifically, when you use the built-in date hierarchy, Power BI may not correctly apply filters in calculated columns. This is because each level in the built-in hierarchy (e.g., year, quarter, month) is processed independently, rather than applying filters as a whole.
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi TaoW -Instead of using the built-in Date hierarchy, you can manually create a hierarchy from the individual fields (Year, Quarter, Month, etc.) in the model and ensure that your computed column is part of this structure.Use the individual "Year" field as the slicer (instead of the hierarchy), or make sure your filter logic applies at the date column level, from which the hierarchy is built. This might involve using a calculated column that tags dates according to whether they fall within the valid "order time" and apply that tag to your date column.
Default dynamic Date Slicer and also custom select Dates in PowerBI | MiTutorials (youtube.com)
Power BI - Build Your Own Custom Date Range Slicer (youtube.com)
Create Hierarchy Slicer in Power BI Desktop (youtube.com)
Hope this helps.