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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
rajeshchawla
Helper I
Helper I

Using TransformColumns with newGuid for each row

Hi folks,

 

I'm working to replace row values in a column if it's null to a new GUID. What I have places the same GUID for each row. 

 

#"FixMyCoolColumn" = Table.TransformColumns (#"Removed Blank Rows", {{"CoolColumn", each if _ = null then Text.NewGuid() else _ } } )

 

Any thoughts on how to make each row have a unique GUID ?

 

Regards,

Rajesh

 

1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

It is a know issue with Text.NewGuid().

Try a workaround like:

= Table.TransformColumns(#"Removed Blank Rows",{"CoolColumn", each if _=null then try error Text.NewGuid() otherwise Text.NewGuid()  else _})

View solution in original post

3 REPLIES 3
PC2790
Community Champion
Community Champion

It is a know issue with Text.NewGuid().

Try a workaround like:

= Table.TransformColumns(#"Removed Blank Rows",{"CoolColumn", each if _=null then try error Text.NewGuid() otherwise Text.NewGuid()  else _})

Thanks! The workaround did the trick for me.

 

Regards,

Rajesh

Anonymous
Not applicable

 

 

Table.TransformColumns(lastTab,{{"Column2", each let tng=Text.NewGuid() in if _=null then tng else _}})

 

 

I had never come across this interesting feature before. The problem seems to be circumvented even so or by filling in a whole new column of NewGuid and then taking the ones you need from here

 

or, perhaps the best way:

 

Table.TransformColumns(lastTab,{{"Column3", each _??Text.NewGuid() }})

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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