cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shds Regular Visitor
Regular Visitor

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

Accepted Solutions
Vvelarde Super Contributor
Super Contributor

Re: How to get only data for next or previous X hours

@shds

 

You can use any of this options:

 

Filtering Rows

 

Filter36hours.pngFiltering Rows

Creating a New Column:

 

Column36 horues.pngAdding a Column




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
Vvelarde Super Contributor
Super Contributor

Re: How to get only data for next or previous X hours

@shds

 

You can use any of this options:

 

Filtering Rows

 

Filter36hours.pngFiltering Rows

Creating a New Column:

 

Column36 horues.pngAdding a Column




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors