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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JennyMilf
Frequent Visitor

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

 

View solution in original post

4 REPLIES 4
JennyMilf
Frequent Visitor

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

 

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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