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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Bassil74
Helper I
Helper I

Copy values from one column to another in selected rows

I have column A in table T1 which has two columns x and y, column x has null values, column y has y1,y2 values in the corresponding cells of the null cells in column x. I need formula in M language to copy the value of y1,y2 to replace null values in column x

4 REPLIES 4
Anonymous
Not applicable

Hi @Bassil74 ,

 

You want to put copy 3 and 4 from y column to x column, right?

vstephenmsft_0-1696314927581.png

Just add a custom column.

vstephenmsft_2-1696315100229.png

vstephenmsft_3-1696315104814.png

 

If your column x null value appears as null, you can modify the custom as follows.

vstephenmsft_4-1696315174827.png

vstephenmsft_5-1696315193079.png

vstephenmsft_6-1696315196518.png

Best Regards,

Stephen Tao

 

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

Bassil74
Helper I
Helper I

Thanks @wdx223_Daniel  this is still not working for me, the formula i put is = Table.ReplaceValue(Expand_Cluster,each [clusterId],"",(x,y,z)=>[clusterId]??[clusterId.1],{"clusterId.1"}) 

and it returns no change to column clusterId which is expected to change to the values from clusterId.1 column. 

Table.ReplaceValue(Expand_Cluster,each [clusterId],"",(x,y,z)=>x??y,{"clusterId.1"})

wdx223_Daniel
Super User
Super User

NewStep=Table.ReplaceValue(YourTableName,each [Column x],"",(x,y,z)=>x??y,{"Column y"})

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Kudoed Authors