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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Maria_Maria
Helper II
Helper II

Abort table refresh conditionally

There is a great idea to check if the table is empty and abort refresh if it is to avoid empty visuals shown in the report.

EmptyCheck = if Table.IsEmpty(dbo_Employees) = true then error "Table is empty. Update aborted" else dbo_Employees

But if there is more than 1 table used in the report then PBI aborts all the tables' refreshes with 'blocked by failuers in other queries' reason.

 

Is there a way to re-wite this query so that PBI aborted refresh only for the tables that are empty.

I understand that I need to change '... then error' part to something different, but can't seen to figure out what.

 

Appreciate your help.

 

1 REPLY 1
miguel
Community Admin
Community Admin

Hey!

This is currently possible via the XMLA endpoints. The XMLA endpoints offer you the ability to define what tables need to be processed / evaluated and which ones you don't want to re-evaluate. Furthermore, you can also go to a partition level to execute the queries that way.

 

For Power BI Desktop the refresh always occur for all tables or, in other words, for the full data model. You have more control once it's published in the service and you interact with the data model through the XMLA endpoints.

 

Below is a link to an article that talks more about these capabilities with the XMLA endpoint:

Dataset connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft Docs

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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