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 after Date hour

Hi everybody, I'm new using PowerBI, I started 2 days ago with a webbinnar but I'm having a lot of problems with one challenge: filtering between Dates with Hours.

 

In my report, I need to filter by Day and Time to know how many people has been logged, I can easily filter between dates with the Date slicer, but I want to specify the hour too.

 

I've created another auxiliar table called 'Table' and related with my primary table 'Log'. Then I've created the following mesure:

 

Prueba = IF(MAX('BatchTemporales'[Hora Filter])>=MAX('Table'[Hora Filter2]);TRUE();FALSE())

I want to filter the times after the selected hour ('Table'[Hora Filter2]), but it just work when both values are equal:

 

Demo

 

As you can see, I expect when HoraFilter is >= than HoraFilter2, my flag is TRUE.

 

Can you help me?

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

hi, @Anonymous

I have tested on my side, but not reproduce the issue. and we need more detail steps for us.

For example:
Prueba = IF(MAX('BatchTemporales'[time])>=MAX('Table'[time2]),TRUE(),FALSE())
5.JPG
So I want to know:
What is the relationship between 'Table' and 'BatchTemporales' ?
In my sample pbix file, my 'Table'  is a date table with date and time as below:
6.JPG
and they create a relationship by date column
7.JPG
 
So what is relationship in your pbix file, it is better you could share some sample data with model structure for us.
 
 

Best Regards,

Lin

 
 
Community Support Team _ Lin
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

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

I have tested on my side, but not reproduce the issue. and we need more detail steps for us.

For example:
Prueba = IF(MAX('BatchTemporales'[time])>=MAX('Table'[time2]),TRUE(),FALSE())
5.JPG
So I want to know:
What is the relationship between 'Table' and 'BatchTemporales' ?
In my sample pbix file, my 'Table'  is a date table with date and time as below:
6.JPG
and they create a relationship by date column
7.JPG
 
So what is relationship in your pbix file, it is better you could share some sample data with model structure for us.
 
 

Best Regards,

Lin

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

Thank you very much! The problem was my relation between tables!

AlB
Community Champion
Community Champion

Hi @Anonymous

 

What type is the data in fields 'Hora Filter' and 'Hora Filter2'?

Can you share your pbix file (with dummy data if necessary)? 

Anonymous
Not applicable

Now I can't upload my .pbix because I have limited my job network, but I attach you two captures:

pwbi1.JPGpwbi2.JPG

 

Hope it can help you, thanks!

themistoklis
Community Champion
Community Champion

@Anonymous

 

Why dont you use a calculate column and not a measure

 

Prueba = IF('BatchTemporales'[Hora Filter]>='Table'[Hora Filter2];TRUE();FALSE())
Anonymous
Not applicable

Hi @themistoklis, I've tried but as [Hora Filter2] is a variable that user selects, I think I've to use a Mesure.

 

Do you have another idea?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors