The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi Community
I hope you can help with the issue I have been sttruggling with
I am trying to extract the unique values from a column in a table and include them as new columns in the same table (I have been able to do this), and I need that correspondant value based on the Record ID to be tranformed in the respective column as 1 or 0. I do not want to do this task as "Conditional Column" because there could be more than 1,000 unique values, so it will take some time to do it this way.
Basically, what I need is from a table as per below
Transform into a table as per below
I hope this makes sense and you can help me with it
Many Thanks
Solved! Go to Solution.
Hi @Anonymous ,
You can try with the following steps in Power Query editor :
1) First you will have to create a column in your table which holds value "1" for all the rows
2) Click on the Type column and select Pivot Column option from Transform ribbon. Select the "Value" column in "Values Column" section and Count(All) under "Aggregate Value Function"
3) You will get the required result as below :
Hope this answers your query!
Please accept the solution if this answers your question.
Thanks,
Avantika Thakur
Hi @Anonymous ,
You can try with the following steps in Power Query editor :
1) First you will have to create a column in your table which holds value "1" for all the rows
2) Click on the Type column and select Pivot Column option from Transform ribbon. Select the "Value" column in "Values Column" section and Count(All) under "Aggregate Value Function"
3) You will get the required result as below :
Hope this answers your query!
Please accept the solution if this answers your question.
Thanks,
Avantika Thakur
Hi Avantika
Thanks for that, it works beatifully. Just on final question. Is it possible not to include the prefix "1.2"?
Regards,
Carlos
Hi @Anonymous ,
"1.2" is just the datatype of the column which is currently set to decimal number and you can change the data type to any other format as per requirement by clicking on the "1.2" on every column.
Thanks,
Avantika
Ops, my bad
Forgot my comment
Many Thanks for the quick reply
Regards,
Carlos
User | Count |
---|---|
70 | |
67 | |
62 | |
48 | |
28 |
User | Count |
---|---|
113 | |
78 | |
64 | |
55 | |
43 |