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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Managing textcodes in a Power BI column

Hello everyone,

 

I have a table with textcodes inside which looks like this :

 

MEXCAM_1CAM_2CAM_3CAM_4
247442204431C313--C32DU1C32F--HORSCI
238029411820C313--C32F--F114--HORSCI

 

I would like to have a CAMS column with one textcode for a line like :

 

MEXCAMS
247442204431C313--
247442204431C32DU1
247442204431C32F--
247442204431HORSCI
238029411820C313--
238029411820C32F--
238029411820F114--
238029411820HORSCI

 

Do you have an idea ? 🙂

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Agree with @MarcelBeug. Clarify the issue can make us understand better and deliver prompt response. Smiley Happy

 

In your sceanrio, if there are another columns in the table, you can select columns CAM_1,CAM_2,CAM_3,CAM_4, then click Unpivot Columns. See:

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Agree with @MarcelBeug. Clarify the issue can make us understand better and deliver prompt response. Smiley Happy

 

In your sceanrio, if there are another columns in the table, you can select columns CAM_1,CAM_2,CAM_3,CAM_4, then click Unpivot Columns. See:

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

You are both right, I should have been more precise... Thank you both for your help, it does work 🙂

Hi @Anonymous,

 

Glad to hear the problem was gone. Smiley Happy

 

Would you please mark helpful replies as answers so that we can close this thread?

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MarcelBeug
Community Champion
Community Champion

In Power Query you can simply unpivot the CAM columns - select the MEX column, right-click and choose unpivot other columns - which will give you an "Attribute"  and a "Value" column.

Rename "Value" to "CAMS" and remove the "Attribute"  column.

 

 

 

Specializing in Power Query Formula Language (M)
Anonymous
Not applicable

Hi marcel thanks for your help but it's not working...

 

Is it because i have other columns in my original table ?

Probably. You need to unpivot only the columns that need to be unpivotted. So either you select these columns and choose "Unpivot columns" or you select the other columns and select "Unpivot other columns".

 

In future please avoid "it's not working", but be more specific: what error message do you get at which step, or share the actual result versus the expected result.

Specializing in Power Query Formula Language (M)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.