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
Anonymous
Not applicable

Filter by Current day

Hi,

 

I want to filter out rows and only include the current day in my direct query. i have used 

filter rows.png

 

 

 

 

 

 

 

 

 

 

 

 

 

This works fine for today but when i publish the report and look at in the web viewer it stops at midnight. So the next day no matter how much i refresh it wont move to "today" and stays on yesterday. I have to re-publish the report and this fixes it.

 

any ideas to keep it active for the current day? I also have this issue with current hour, as soon as it moves on the refresh stops.

 

any help would be great.

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please check my replies in below links:

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

refresh date in service

 

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.
Anonymous
Not applicable

Hi,

 

I'm finally back in the office to check this.

 

This is a Direct Query so i don't have the option for the scheduled refresh.

 

Any other ideas?

jthomson
Solution Sage
Solution Sage

Look at what's actually happening in the advanced editor - I'd guess it's not actually writing the code for today, instead writing the code for 14/8/2018. Have a look and maybe replace it with DateTime.Date(DateTime.LocalNow()) if that's the case

Anonymous
Not applicable

Thanks for the help,

 

I changed it to 15 minutes to help fault find and here is the code below. It works when I press refresh in the desktop but when I publish it doesn;t update the rolling 15 minute window. It seems to only keep the original window until i refresh and re-publish the dataset.

 

any idea why this is the case or how to get around it? 

filter rows.png

 

 

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.