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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Query Editor Error when query is empty

Hi, I have a query in the query editor that brings me the errors detected in other query:

error.jpg

 

This appears in a table and is useful for the users to detect the errors and fix them.

 

But when there is no error, the query fails and I can't get the report refreshed. 

 

Is there a possibility to , if the query is empty, allow the report to refresh without problems? And the table that shows the error would be empty. Maybe there is an M code that allows this.

 

Thanks

4 REPLIES 4
Anonymous
Not applicable

@Anonymous 

Check if there are errors in the original queries. Can you share the error message? Is it possible to produce that error and share the pbix with us.


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Did not get it completely. But there should be an error in some row.

refer if this can help

https://www.youtube.com/watch?v=OE6DPmKqN7s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
mahoneypat
Microsoft Employee
Microsoft Employee

Yes.  You can use try ... otherwise in your last step (or in the "in" expression).  You can have the otherwise part return null or you can point to another query with mock/empty data (if you need columns to match your actual data if you have a visual expecting values, etc.).  Please see this link for more about try ... otherwise - https://docs.microsoft.com/en-us/power-query/handlingerrors

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thanks, can you provide an example of a line in M with try / otherwise?

I would like to use it in the step "Replace Errors". If there is no error, then put replace the content of the columns with blanks

 

 

Regards,

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.