Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Uhrond
Frequent Visitor

Filter and Date hierarchy

Hello,

I have a filter problem on the dates, I can't understand how it works:

I have only one table containing dates as well as a "year" (annee) column corresponding to the year of each date.

 

Uhrond_0-1638281602185.png

If I add a "year" filter and an array containing the dates, the array is not filtered when I select a year in the filter :

Uhrond_3-1638282042466.pngUhrond_4-1638282072752.png

It works if I display the dates in the table without the hierarchy.

But I don't understand why it doesn't work with date hierarchy enabled.

Uhrond_5-1638282116950.pngUhrond_6-1638282135988.png

 

Thank you for your explanation

 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Uhrond ,

It seems that you enable Auto date/time option. When the option is enabled, Power BI Desktop creates a hidden auto date/time table for each date column. Auto date/time tables are permanently hidden, even from modelers. They cannot be seen in the Fields pane or the Model view diagram, and its rows cannot be seen in Data view. Power BI Desktop also creates a relationship between the auto date/time table's Date column and the model date column. The auto date/time table contains full calendar years encompassing all date values stored in the model date column. For example, if the earliest value in a date column is March 20, 2016 and the latest value is October 23, 2019, the table will contain 1,461 rows. It represents one row for each date in the four calendar years 2016 to 2019. When Power BI refreshes the model, each auto date/time table is also refreshed. This way, the model always contains dates that encompass the date column values. You can find the following documentation for full details.

Apply auto date/time in Power BI Desktop

yingyinr_0-1638515752775.png

When you want to Date Hierarchy, you can also add the slicer field onto the table visual. Then it will be filtered correctly just as below screenshot...

yingyinr_1-1638516172775.png

Or you can apply the Year field from Date hiererchy as slicer option:

yingyinr_2-1638516262582.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @Uhrond ,

It seems that you enable Auto date/time option. When the option is enabled, Power BI Desktop creates a hidden auto date/time table for each date column. Auto date/time tables are permanently hidden, even from modelers. They cannot be seen in the Fields pane or the Model view diagram, and its rows cannot be seen in Data view. Power BI Desktop also creates a relationship between the auto date/time table's Date column and the model date column. The auto date/time table contains full calendar years encompassing all date values stored in the model date column. For example, if the earliest value in a date column is March 20, 2016 and the latest value is October 23, 2019, the table will contain 1,461 rows. It represents one row for each date in the four calendar years 2016 to 2019. When Power BI refreshes the model, each auto date/time table is also refreshed. This way, the model always contains dates that encompass the date column values. You can find the following documentation for full details.

Apply auto date/time in Power BI Desktop

yingyinr_0-1638515752775.png

When you want to Date Hierarchy, you can also add the slicer field onto the table visual. Then it will be filtered correctly just as below screenshot...

yingyinr_1-1638516172775.png

Or you can apply the Year field from Date hiererchy as slicer option:

yingyinr_2-1638516262582.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.