Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I have a query in the query editor that brings me the errors detected in other query:
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
@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.
@Anonymous , Did not get it completely. But there should be an error in some row.
refer if this can help
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
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 66 | |
| 65 | |
| 56 |