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
shds
Advocate I
Advocate I

How to get only data for next or previous X hours

Hello,

 

I just found out that it is not very easy to do a SQL-like query on DateTime fields where the value should be BETWEEN datetime 1 and datetime 2.

 

How is it possible to achieve this for a dataset in PowerBI? I would like to get a set of records that only shows the next 36 hours for example. I have experimented with a custom column ("IsNext36Hours"), but cannot figure out how to fill it properly.

 

Any suggestions on how to achieve this?

 

Thanks in advance!

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@shds

 

You can use any of this options:

 

Filtering Rows

 

Filtering RowsFiltering Rows

Creating a New Column:

 

Adding a ColumnAdding a Column




Lima - Peru

View solution in original post

1 REPLY 1
Vvelarde
Community Champion
Community Champion

@shds

 

You can use any of this options:

 

Filtering Rows

 

Filtering RowsFiltering Rows

Creating a New Column:

 

Adding a ColumnAdding a Column




Lima - Peru

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.