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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Rosario
Helper I
Helper I

Transpose and unpivot table

 

Hi I can I get help to transpose and unpivot this table please? Thank YOU.

 

 

    ProfessionTravel Overseas Children 
Centre CodeLocationsMarriagesDivorcesYesNoYesNoYesNo
14Aguascalientes881177992866523
480Baja California103143101201037627
2358Baja California Sur581215710583523
2489Campeche58945620583226
2494Chiapas111152110101117437
2501Chihuahua651245690653926
5001Ciudad de México3350276033033
5125Coahuila581185710584711
5164Colima436926170431924
5302Durango111160108301114368
5313Guanajuato911198651905437
5316Guerrero113196107601137142
5346Hidalgo58735800584315

 

I want to have it as below example:

 

StatusCentre CodeLocationsValue
Marriages14Aguascalientes88
Marriages480Baja California103
Marriages2358Baja California Sur58
Marriages2489Campeche58
Marriages2494Chiapas111
Marriages2501Chihuahua65
Marriages5001Ciudad de México33
Marriages5125Coahuila58
Marriages5164Colima43
Marriages5302Durango111
Marriages5313Guanajuato91
Marriages5316Guerrero113
Marriages5346Hidalgo58
Divorces14Aguascalientes117
Divorces480Baja California143
Divorces2358Baja California Sur121
Divorces2489Campeche94
Divorces2494Chiapas152
Divorces2501Chihuahua124
Divorces5001Ciudad de México50
Divorces5125Coahuila118
Divorces5164Colima69
Divorces5302Durango160
Divorces5313Guanajuato119
Divorces5316Guerrero196
Divorces5346Hidalgo73
Profession-Yes14Aguascalientes79
Profession-Yes480Baja California101
Profession-Yes2358Baja California Sur57
Profession-Yes2489Campeche56
Profession-Yes2494Chiapas110
Profession-Yes2501Chihuahua56
Profession-Yes5001Ciudad de México27
Profession-Yes5125Coahuila57
Profession-Yes5164Colima26
Profession-Yes5302Durango108
Profession-Yes5313Guanajuato86
Profession-Yes5316Guerrero107
Profession-Yes5346Hidalgo58
Profession-No14Aguascalientes9
Profession-No480Baja California2
Profession-No2358Baja California Sur1
Profession-No2489Campeche2
Profession-No2494Chiapas1
Profession-No2501Chihuahua9
Profession-No5001Ciudad de México6
Profession-No5125Coahuila1
Profession-No5164Colima17
Profession-No5302Durango3
Profession-No5313Guanajuato5
Profession-No5316Guerrero6
Profession-No5346Hidalgo0
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Rosario,

 

You have to just do transformation in Advance query editor mode in power bi.

I have taken your sample data and met your requeriments.

kindly have a look and revert me if any concern.

 

https://drive.google.com/file/d/1NGhZWSTPVcoFwIMNT-aSHoMt9lW59tTh/view?usp=sharing 

 

Best Regards,

Ravi

View solution in original post

Thanks @Anonymous, it is exactly as I want it. I will re do it following your steps in edit query. Cheers

Rosario

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Rosario,

 

You have to just do transformation in Advance query editor mode in power bi.

I have taken your sample data and met your requeriments.

kindly have a look and revert me if any concern.

 

https://drive.google.com/file/d/1NGhZWSTPVcoFwIMNT-aSHoMt9lW59tTh/view?usp=sharing 

 

Best Regards,

Ravi

Thanks @Anonymous, it is exactly as I want it. I will re do it following your steps in edit query. Cheers

Rosario

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.