Forum Discussion

RevitUser's avatar
RevitUser
Frequent Visitor
2 years ago
Solved

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_idITP Item No.ITP No.Verification Activity byLot No.
10252a62d - 3e09-4545 - a2cf - 035ec850e4334.5HSEQ - QC - ITP002 - GEO - 20774a3e930f - a6bd - 4757 - b22d - 7caf0fddfa13 
2053c4f89-8a83-4d2a - adb5 - a6496decee371.4HSEQ - QC - ITP002 - GEO - 2077e20c3f7a - fa11-45d3 - a711-6fb8abb7367c 
3057b9582-565d - 4e89 - a7f7 - e8c32655a3632.5HSEQ - QC - ITP002 - GEO - 2077e20c3f7a - fa11-45d3 - a711-6fb8abb7367c0
40724d97e - 294b - 4a11 - a036-5dd09779a0f64.5HSEQ - QC - ITP002 - GEO - 20774a3e930f - a6bd - 4757 - b22d - 7caf0fddfa13 
5Ofbd25e4-4901-4dca - 8f79-8e984b09a8b84.6HSEQ - QC - ITP002 - GEO - 20774a3e930f - a6bd - 4757 - b22d - 7caf0fddfa13 
6131a6e92-5aa2-4c68 - ba22-4de7e23db6e34.5HSEQ - QC - ITP002 - GEO - 2077ed53094e - 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_Daniel's avatar
    wdx223_Daniel
    Community Champion

    NewStep=Table.Combine(Table.Group(YourTable,"issue_id",{"n",each #table({"issue_id"}&[attribute_title],{{[issue_id]{0}}&[attribute_value]})})[n])

  • RevitUser's avatar
    RevitUser
    Frequent Visitor

    Thank you very much both of you. The pivot function was what I was looking for!