2
votes

I have a required where i need to transpose specific column using Powerbi calculated column /power query

1 Dressing
1 Transferring
2 Bathing
2 Dressing
3 Transferring

**Is there anyway to transpose it to the following:**

1 Bathing Dressing Transferring
2 Bathing Dressing
3 Transferring

1
Pivot/UnPivot in the power query editorJon
Hi Jon, Actually i need to pivot only one column, so i think we can't pivot/unpivot only one column.Prem Chand
1 has no Transferring in the input data. Is that a mistake in the sample putput?mkRabbani
Hi @R_R, Thanks for your answer, id 1 has transferring as well. But i can use the given power query for transformation.Prem Chand

1 Answers

2
votes

If Transferring is there for ID 1 is a mistake, you can perform some transformation in Power Query Editor to achieve the required output.

Let, your table looks as below-

enter image description here

Now follow this below steps-

Step-1: Apply a GROUP BY on ID column as shown below-

enter image description here

Step-2: Create a custom column as below-

enter image description here

Step-3: Now extract the values from the new Custom column as below-

enter image description here

Here is the final output. You can remove column grouped_data at the end.

enter image description here