Forum Discussion
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.
Of course. After extracting you can concat your columns :
result:
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
4 Replies
- Ritaf1983
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 workIf this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- JennyMilf
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?
- JennyMilf
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?- Ritaf1983
Super User
Of course. After extracting you can concat your columns :
result:
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly