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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
arkiboys2
Helper IV
Helper IV

dataflow - if there is a row present

hello,

in the dataflow gen2, there are several steps from navigation of the source all the way to pivot column.

After the pivot, the step is to rename column. But the flow fails on this rename step because if there is no data then the step fails as the column does not exists

 

Any suggestions ?

thank you

2 ACCEPTED SOLUTIONS

I would add a dummy row with the necessary columns before that step, so that the step doesn't fail, and then I would filter away the dummy row afterwards. 

View solution in original post

I created a HelperRow which only has columns and no rows.

Then after the pivot step, I appended this helper row.

It seems fine now

 

thank you

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @arkiboys2 

 

If you use Table.RenameColumns to rename columns, a simple solution is to add MissingField.Ignore at the end. MissingField.Type - PowerQuery M | Microsoft Learn

vjingzhanmsft_0-1730946216874.png

vjingzhanmsft_1-1730946616923.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

frithjof_v
Super User
Super User

If you want to do the try ... otherwise ... logic instead of adding a dummy row, there is a description in the link. I can actually recommend to go through all the parts of this series if you have the time:

 

https://bengribaudo.com/blog/2020/01/15/4883/power-query-m-primer-part-15-error-handling

 

I've done most of the parts, but I skipped the last ones as I didn't feel they were so relevant for my use cases at the time.

 

I don't think there are so many users who have gone through this series, but it gives a great theoretical description (and also many practical examples!) of the Power Query M language. If you have the time. I had already worked 3 years with Power BI/Power Query before I did this series.

lbendlin
Super User
Super User

use try ... otherwise ...  to decide what to produce in this scenario.

you mean to have try catch inside dataflow gen2? is this the only way?

how is this possible?

thanks

You could add a dummy row.

 

However, do you want the dataflow to succeed if there is no data?

yes to succeed if there is no row. thanks

I would add a dummy row with the necessary columns before that step, so that the step doesn't fail, and then I would filter away the dummy row afterwards. 

Thankyou

I created a HelperRow which only has columns and no rows.

Then after the pivot step, I appended this helper row.

It seems fine now

 

thank you

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

May FBC25 Carousel

Fabric Monthly Update - May 2025

Check out the May 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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