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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Arunthathi
New Member

How to create custom error messages for missing tables/columns in Power BI Template App

Hi Community,

I am building a Power BI Template App connected to Snowflake.
In Power BI Desktop, when required tables or columns are missing, the error message clearly shows which table/column is missing.
But in the Service (Template App), users only see a generic "Refresh failed" message.

I want to create a custom error message that:
- Lists missing tables (e.g., RETURNS, FINANCE)
- Lists missing columns (e.g., ACCOUNT_ID, SIZE_MATCH)
- Shows a friendly card visual like "⚠️ Issues Found" or " All required tables are present"

I have tried M code like:
```M

let
Source = _BaseSchema_Snowflake,
RawTable = Source{[Name = "ACCOUNT_SCORES", Kind = "Table"]}[Data],

RequiredColumns = {
"COLUMN 1",
"COLUMN 2",
"COLUMN 3",
"COLUMN 4",
"COLUMN 5",
"COLUMN 6"

},

MissingColumns =
List.Difference(RequiredColumns, Table.ColumnNames(RawTable)),

ValidatedTable =
if List.IsEmpty(MissingColumns)
then RawTable
else error
"ACCOUNT_SCORES table is missing required columns: "
& Text.Combine(MissingColumns, ", ")
in
ValidatedTable

 

 

 

 

1 ACCEPTED SOLUTION
cengizhanarslan
Super User
Super User

You generally cannot reliably surface those custom refresh-time errors as a report visual in the Service, because when refresh fails, the dataset/model isn’t updated, and visuals can’t render “new” status coming from that failed refresh. In Template Apps, users often only see the generic refresh failure summary.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

View solution in original post

4 REPLIES 4
v-prasare
Community Support
Community Support

Hi @Arunthathi,

We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

 

 

 

Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support

v-prasare
Community Support
Community Support

Hi @Arunthathi 

We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

 

@lbendlin & @cengizhanarslan, Thanks for prompt response.

 

 

Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support

lbendlin
Super User
Super User

You cannot use error handling for missing tables. These always require a manual meta data refresh.

 

There are functions in Power Query to handle missing columns, however the final query output meta data will be cached which will again result in an error message that you can only clear via a schema refresh.

cengizhanarslan
Super User
Super User

You generally cannot reliably surface those custom refresh-time errors as a report visual in the Service, because when refresh fails, the dataset/model isn’t updated, and visuals can’t render “new” status coming from that failed refresh. In Template Apps, users often only see the generic refresh failure summary.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.