Forum Discussion
Using SELECTCOLUMNS to build a table
- 6 years ago
annetoal - go back and look at what mahoneypat did. It seems to be to be 100% UI driven, so pretty easy to implement. The steps in summary:
- Select the columns you want to keep, then select Remove Other Coluimns from the Home Menu.
- Select the Response column, then on the Transform ribbon, Unpivot Other Columns
- For the Attribute column, (which has your old column names) extract all text between the "a " and "?" chars. Keep that and get rid of the other text.
- Right-click on the Attribute column and transform to Proper Case.
- Rename the Attribute column to Question and Value to Answer.
See these directions for implementing this code in your model, getting rid of the sample source step and replacing with yours. You really should try this. This is basic Power Query, not advanced, and can be very useful. Use DAX for your analysis, but Power Query for your modeling and data transformation.
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
5) See this article if you need help using this M code in your model. - 6 years ago
Hi annetoal ,
So your issue is solved,right?
Could you pls mark the reply as answered to close it?
Much appreciated.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Thank you for your reply. It is pretty clear, and maybe even I can use it 🙂
Anne
Hi annetoal ,
So your issue is solved,right?
Could you pls mark the reply as answered to close it?
Much appreciated.
Kelly