Forum Discussion
RevitUser
2 years agoFrequent Visitor
Create columns based on column value and give value to column from an other column.
Hi Power BI Community,
I'm looking to orginise my data by the Issue id at the moment my data looks like this:
I would like it to look like this:
| ABC issue_id | ITP Item No. | ITP No. | Verification Activity by | Lot No. | |
| 1 | 0252a62d - 3e09-4545 - a2cf - 035ec850e433 | 4.5 | HSEQ - QC - ITP002 - GEO - 2077 | 4a3e930f - a6bd - 4757 - b22d - 7caf0fddfa13 | |
| 2 | 053c4f89-8a83-4d2a - adb5 - a6496decee37 | 1.4 | HSEQ - QC - ITP002 - GEO - 2077 | e20c3f7a - fa11-45d3 - a711-6fb8abb7367c | |
| 3 | 057b9582-565d - 4e89 - a7f7 - e8c32655a363 | 2.5 | HSEQ - QC - ITP002 - GEO - 2077 | e20c3f7a - fa11-45d3 - a711-6fb8abb7367c | 0 |
| 4 | 0724d97e - 294b - 4a11 - a036-5dd09779a0f6 | 4.5 | HSEQ - QC - ITP002 - GEO - 2077 | 4a3e930f - a6bd - 4757 - b22d - 7caf0fddfa13 | |
| 5 | Ofbd25e4-4901-4dca - 8f79-8e984b09a8b8 | 4.6 | HSEQ - QC - ITP002 - GEO - 2077 | 4a3e930f - a6bd - 4757 - b22d - 7caf0fddfa13 | |
| 6 | 131a6e92-5aa2-4c68 - ba22-4de7e23db6e3 | 4.5 | HSEQ - QC - ITP002 - GEO - 2077 | ed53094e - 1bbe - 4699-8bac - 421711a7be35 |
Note that there may be more columns added in the future.
The only way I know to do this at the moment is by a conditional column and then say if column "attribute_title" contains "ITP No." then = "attribute_value" and then go though all the values and clean it all up in the end.
I hope you are able to help thanks.
3 Replies
- wdx223_DanielCommunity Champion
NewStep=Table.Combine(Table.Group(YourTable,"issue_id",{"n",each #table({"issue_id"}&[attribute_title],{{[issue_id]{0}}&[attribute_value]})})[n])
- rubayatyasminCommunity Champion
- RevitUserFrequent Visitor
Thank you very much both of you. The pivot function was what I was looking for!