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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
judithyap19
New Member

Powerbi Query

Hello.

 

I am using an invoked function to get my data. However if the table generated is empty, the next steps causes an error to my dashboard. I want to create a step where if this step results to an empty table, a new table with same column names and blank row values will be created to avoid errors.

 

judithyap19_0-1722822604505.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi @judithyap19 ,

Based on the description, open the advanced editor and try to add the following formula.

vjiewumsft_0-1724749049768.png

 

let
    Source = YourFunction(),
    IsEmpty = Table.IsEmpty(Source),
    Result = if IsEmpty then
        Table.FromRecords({[name= null, number = null]})
    else
        Source
in
    Result

 

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MFelix
Super User
Super User

Hi @judithyap19 ,

 

Use a if statement with a Table.IsEmpty something similar to:

 

 

if  Table.IsEmpty ( YOUR EXPRESSION)  = true then ALTERNATIVE EXPRESSION else YOUR EXPRESSION

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.