Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
KR300
Helper III
Helper III

Issue - Pivot/ Unpivot Scenario

Hi All,

I want to change below data 

 

FixVersion         Stage       StageStatus

SFP.R.11.8         A              Completed

SFP.R.11.8         B              Completed

SFP.R.11.8         C              In Progress

SFP.R.11.8         D              Not Started

SFP.R.11.9         A              Completed

SFP.R.11.9         B              Completed

SFP.R.11.9         C              In Progress

SFP.R.11.9         D              Not Started

 

to like below

FixVersion                A                            B                                 C                            D                   

SFP.R.11.8        Completed               Completed                 In Progress              Not Started

SFP.R.11.9        Completed               Completed                 In Progress              Not Started

 

help me out here.. 

 

2 ACCEPTED SOLUTIONS
BeaBF
Super User
Super User

@KR300 Hi! Here the power query code:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCnYL0AvSMzTUs1BQ0lFyVAACIO2cn1uQk1qSmqIUq4OuxokINc5QNZ55CgFF+elFqcXFWFS5QFX55ZcoBJckFmGYZUmEmyyJcJMlUW6yxOmmWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"FixVersion " = _t, Stage = _t, StageStatus = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"FixVersion ", type text}, {"Stage", type text}, {"StageStatus", type text}}),
#"Pivoted Column" = Table.Pivot(
Table.TransformColumnTypes(#"Changed Type", {{"Stage", type text}, {"StageStatus", type text}}),
List.Distinct(#"Changed Type"[Stage]),
"Stage",
"StageStatus"
)
in
#"Pivoted Column"

from:

BeaBF_0-1736336256999.png

 

you'll obtain:

BeaBF_1-1736336280451.png

 

if it's ok, please accept my answer as solution!

 

BBF

View solution in original post

mussaenda
Community Champion
Community Champion

Hi @KR300 ,

 

Have you tried to use the Pivot/Unpivot option in Power Query?

View solution in original post

2 REPLIES 2
mussaenda
Community Champion
Community Champion

Hi @KR300 ,

 

Have you tried to use the Pivot/Unpivot option in Power Query?

BeaBF
Super User
Super User

@KR300 Hi! Here the power query code:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCnYL0AvSMzTUs1BQ0lFyVAACIO2cn1uQk1qSmqIUq4OuxokINc5QNZ55CgFF+elFqcXFWFS5QFX55ZcoBJckFmGYZUmEmyyJcJMlUW6yxOmmWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"FixVersion " = _t, Stage = _t, StageStatus = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"FixVersion ", type text}, {"Stage", type text}, {"StageStatus", type text}}),
#"Pivoted Column" = Table.Pivot(
Table.TransformColumnTypes(#"Changed Type", {{"Stage", type text}, {"StageStatus", type text}}),
List.Distinct(#"Changed Type"[Stage]),
"Stage",
"StageStatus"
)
in
#"Pivoted Column"

from:

BeaBF_0-1736336256999.png

 

you'll obtain:

BeaBF_1-1736336280451.png

 

if it's ok, please accept my answer as solution!

 

BBF

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.