Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JoHo_BI
Responsive Resident
Responsive Resident

DirectQuery hangs with the Today function

Hi all,

 

I have a very simple matrix which shows order numbers by client. I've added a custom column in the orders table to query whether the date is today, which is the following: 

 

_IsToday = IF(DATE(YEAR(Orders[DateCreated]),MONTH(Orders[DateCreated]),DAY(Orders[DateCreated])) = DATE(YEAR(TODAY()), MONTH(TODAY()), DAY(TODAY())), TRUE(),FALSE())

 

This works perfectly within the desktop software, but timesout and throws a resources available exceeded error while querying it on app.powerbi.com

 

Both the Power BI software and my browser are set to English (UK) locale.

 

If anyone can offer any insight, i'd be extremely grateful!

 

Thanks in advance,

Joe.

 

EDIT: I've also cleared the cache in the software and my browsers too.

6 REPLIES 6
v-shex-msft
Community Support
Community Support

Hi @JoHo_BI,

 

I can't reproduce your issue, your formula works well on my side.  Can you ensure you have correctly configation the datasource?


In addition, if you can please share some detail information about your issue, it will be help for troubleshooting.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft - Thanks for your reply, 

 

Please find a link for a small test dataset available.

 

Test Dataset

 

In the top right, there is a "IsToday" filter, using the formula from the original post. It however does not load and still throws the error. 

 

The datasource works perfectly, I can pull in data as you can see on the table on the left. 

JoHo_BI
Responsive Resident
Responsive Resident

Still very much need help!

Hi @JoHo_BI,

 

But it works on my side:

 

https://msit.powerbi.com/view?r=eyJrIjoiMGYxMjkzNzItMGU5My00OTgyLTkxNjctMmY5NGNjMWI4MDNkIiwidCI6Ijcy...

 

How many records your table contains? I think the issue may related to it. Can you share some detail content?

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft,

 

The table I am drawing from contains approx. 400k rows before I apply the table filters. After the filters, it goes to 886 rows, but still doesn't pull through the data unfortunately.

 

I see your report works, however IsToday always returns false. If it were to return at least 1 true record, i'm not sure it would load. 

Hi @JoHo_BI,

 

>>The table I am drawing from contains approx. 400k rows before I apply the table filters.

Perhaps you can try to use value function to create a new table with the value of "istoday" column, create the relationship to original table and use the new table as the source of slicer.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors