Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone,
I have a table with textcodes inside which looks like this :
MEX | CAM_1 | CAM_2 | CAM_3 | CAM_4 |
247442204431 | C313-- | C32DU1 | C32F-- | HORSCI |
238029411820 | C313-- | C32F-- | F114-- | HORSCI |
I would like to have a CAMS column with one textcode for a line like :
MEX | CAMS |
247442204431 | C313-- |
247442204431 | C32DU1 |
247442204431 | C32F-- |
247442204431 | HORSCI |
238029411820 | C313-- |
238029411820 | C32F-- |
238029411820 | F114-- |
238029411820 | HORSCI |
Do you have an idea ? 🙂
Solved! Go to Solution.
Hi @Anonymous,
Agree with @MarcelBeug. Clarify the issue can make us understand better and deliver prompt response.
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:
Best Regards,
Qiuyun Yu
Hi @Anonymous,
Agree with @MarcelBeug. Clarify the issue can make us understand better and deliver prompt response.
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:
Best Regards,
Qiuyun Yu
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.
Would you please mark helpful replies as answers so that we can close this thread?
Best Regards,
Qiuyun Yu
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.
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.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |