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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Filtering hours in date herarchy

Hi guys i have a question,

 

mo12_0-1683719053919.png

 

 

i have this date herarchy and i want that the column "hours" gave me only the hours between 6-14 o clock.

How can i do this because i tried it with a filter but it didnt worked. He showed the results from every hour and not from the hours i want. 

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

Hi , @Anonymous 

According to your description, you want to filter the Hour in 6-14.

For your need , you can create a calculated column for [Hour]:

Hour = IF( HOUR([Date])>=6 &&HOUR([Date])<=14 , HOUR([Date]) ,BLANK())

 

vyueyunzhmsft_0-1683859554456.png

Then we can create a custom hierarchy like this:

vyueyunzhmsft_1-1683859587084.png

Then we can put the hierarchy  on the visual and we can use "Filter on thsi visual" to filter the null value:

vyueyunzhmsft_2-1683859622065.png

 

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

According to your description, you want to filter the Hour in 6-14.

For your need , you can create a calculated column for [Hour]:

Hour = IF( HOUR([Date])>=6 &&HOUR([Date])<=14 , HOUR([Date]) ,BLANK())

 

vyueyunzhmsft_0-1683859554456.png

Then we can create a custom hierarchy like this:

vyueyunzhmsft_1-1683859587084.png

Then we can put the hierarchy  on the visual and we can use "Filter on thsi visual" to filter the null value:

vyueyunzhmsft_2-1683859622065.png

 

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.