SOLVED

Transposing data for better analysis

%3CLINGO-SUB%20id%3D%22lingo-sub-1297106%22%20slang%3D%22en-US%22%3ETransposing%20data%20for%20better%20analysis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297106%22%20slang%3D%22en-US%22%3E%3CP%3EOK%20Excel%20junkies%2C%20I%20have%20been%20handed%20a%20large%20file%20of%20survey%20data.%26nbsp%3B%20I%20am%20trying%20to%20simplify%20the%20data%20to%20make%20my%20import%20into%20PBI%20easier%2C%20and%20my%20visualizations%20much%20more%20flexible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20data%20columns%20that%20look%20like%20this%3A%3C%2FP%3E%3CP%3ENAME%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20LOCATION%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BGroup1%3AComms%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BGroup1%3AFlexibility%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Group2%3AComms%26nbsp%3B%20%26nbsp%3B%20Group2%3AFlexibility%3C%2FP%3E%3CP%3ESusie%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BJamaica%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B5%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B4%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B4%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B4.5%3C%2FP%3E%3CP%3E...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20couple%20of%20hundred%20columns%20that%20are%20survey%20results%20in%20categories%20based%20on%20the%20group%20%22Susie%22%20is%20rating.%26nbsp%3B%20I'm%20thinking%20the%20better%20way%20to%20handle%20this%20data%20is%20to%20change%20it%20to%20look%20like%20this%3A%3C%2FP%3E%3CP%3ENAME%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20LOCATION%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BGroup%23%26nbsp%3B%20Comms%26nbsp%3B%20%26nbsp%3B%20Flexibility%26nbsp%3B%3C%2FP%3E%3CP%3ESusie%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BJamaica%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BGroup1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%205%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B4%3C%2FP%3E%3CP%3ESusie%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BJamaica%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BGroup2%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%204%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%204.5%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20seen%20Excel%20transforms%20on%20columns%20to%20rows%20etc...but%20this%20is%20effectively%20duplicating%20rows%20and%20adding%20in%20the%20new%20information%20as%20a%202nd%20row.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20fairly%20versed%20in%20PowerQuery%20as%20well%2C%20so%20I%20could%20leave%20the%20data%20and%20do%20the%20transform%20inside%20that%20if%20someone%20has%20a%20great%20idea%20on%20how%20to%20solve%20that...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1297106%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20BI%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297148%22%20slang%3D%22en-US%22%3ERe%3A%20Transposing%20data%20for%20better%20analysis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297148%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F412079%22%20target%3D%22_blank%22%3E%40gckcmc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHello%2C%20all%20you%20need%20is%20Power%20Query%20to%20Unpivot%26nbsp%3B%20column%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20watch%20the%20video%20below%20to%20see%20exactly%20how%20to%20unpivot%20using%20Power%20Query.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJMrfbv2h7p8%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJMrfbv2h7p8%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EIf%20this%20answers%20suits%20you%2C%20kindly%20do%20accept%20as%20the%20Best%20Response%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EThanks%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298164%22%20slang%3D%22en-US%22%3ERe%3A%20Transposing%20data%20for%20better%20analysis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298164%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F421698%22%20target%3D%22_blank%22%3E%40Abiola1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPerfect%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298167%22%20slang%3D%22en-US%22%3ERe%3A%20Transposing%20data%20for%20better%20analysis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298167%22%20slang%3D%22en-US%22%3EGlad%20to%20help%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

OK Excel junkies, I have been handed a large file of survey data.  I am trying to simplify the data to make my import into PBI easier, and my visualizations much more flexible.

 

I have data columns that look like this:

NAME      LOCATION     Group1:Comms     Group1:Flexibility        Group2:Comms    Group2:Flexibility

Susie         Jamaica                               5                               4                               4                             4.5

...

 

I have a couple of hundred columns that are survey results in categories based on the group "Susie" is rating.  I'm thinking the better way to handle this data is to change it to look like this:

NAME      LOCATION     Group#  Comms    Flexibility 

Susie         Jamaica         Group1            5                 4

Susie         Jamaica         Group2            4              4.5

 

I've seen Excel transforms on columns to rows etc...but this is effectively duplicating rows and adding in the new information as a 2nd row.  

 

I am fairly versed in PowerQuery as well, so I could leave the data and do the transform inside that if someone has a great idea on how to solve that...

 

thanks!

 

3 Replies
Highlighted
Best Response confirmed by gckcmc (New Contributor)
Solution

@gckcmc 

 

Hello, all you need is Power Query to Unpivot  column

 

You can watch the video below to see exactly how to unpivot using Power Query.

https://www.youtube.com/watch?v=JMrfbv2h7p8

 

If this answers suits you, kindly do accept as the Best Response

 

Thanks

Highlighted

@Abiola1 

Perfect, thanks!

Highlighted
Glad to help