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
aabalosc
Frequent Visitor

IsInPreviousNMinutes does not get current date when refreshing a dataset in the Power BI service

The IsInPreviousNMinutes function does not get the current date when refreshing a Power BI report using the Power BI service.

 

The date that this function is taking seems to be the one that the original report was using when it was last refreshed in Power BI Desktop.

 

This date filter should get data for the previous XX minutes, not bound to the date on which the report was created.

 

To me, this looks like a bug, but maybe I misunderstood the functionality??

 

PS: The same could apply to the related functions IsInPreviousHour, IsInPreviousMinute, IsInPreviousNHours, ...

 

Thanks,

Antonio.

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @aabalosc,

 

As IsInPreviousNMinutes is a Power Query function, when we refresh report in Power BI desktop, the dataset is updated, that is to say, Power Query is executed, so IsInPreviousNMinutes always get latest date/time.

 

However, after publishing report to service, when we click the page refresh button, the dataset is not updated (Power Query is not executed). That is why the values returned by IsInPreviousNMinutes are static.

 

To resolve this problem, you should configure a schedule refresh for this dataset to schedule run Power Query.

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft
Employee
Employee

Hi @aabalosc,

 

As IsInPreviousNMinutes is a Power Query function, when we refresh report in Power BI desktop, the dataset is updated, that is to say, Power Query is executed, so IsInPreviousNMinutes always get latest date/time.

 

However, after publishing report to service, when we click the page refresh button, the dataset is not updated (Power Query is not executed). That is why the values returned by IsInPreviousNMinutes are static.

 

To resolve this problem, you should configure a schedule refresh for this dataset to schedule run Power Query.

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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.

Top Solution Authors
Top Kudoed Authors