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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
JennyMilf
Helper I
Helper I

Delete column - add new column

Hello everyone,

I create a new column (Device_code) based on 2 digits DeviceName column.

My DAX like: Device_code= LEFT('TableA'[DeviceName ], 2)

After that, I just want to keep Device_code, and delete the original DeviceName column. I tried deleting as normal, but the result got Error value in Device_code

Can anyone help me to deal with it? Thank you.

1 ACCEPTED SOLUTION

Of course.  After extracting you can concat your columns :

Ritaf1983_0-1689907074992.pngRitaf1983_1-1689907107195.png

result:

Ritaf1983_2-1689907229205.png

 

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
JennyMilf
Helper I
Helper I

Thank you but besides extracting value in the DeviceName column, I want to extract another column as well. And finally, I can concatenate all of them. The final dataset expect is delete all original columns
Can you give me the best solution to do it?

Of course.  After extracting you can concat your columns :

Ritaf1983_0-1689907074992.pngRitaf1983_1-1689907107195.png

result:

Ritaf1983_2-1689907229205.png

 

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @JennyMilf 
You can't delete a column from the data view because you used it and unlike on power query, this step has no "recording" so it needs to have its source column.
You can do the same from PQ  in 1 step with "extract" function and it will work

Ritaf1983_0-1689906336240.png

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you but besides extracting value in the DeviceName column, I want to extract another column as well. And finally, I can concatenate all of them. The final dataset expect is delete all original columns
Can you give me the best solution to do it?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors