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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
ciervax
Frequent Visitor

Data modelling - Convert variable into columns

Hi,

 

I have a raw table looking like this:

 

Date1TypeProductCountryValue
Enero de 2021Toneladas1520685Spain464,51
Enero de 2021Euros1520685Spain3519652,9
Febrero de 2021Toneladas1520685Spain1518,89
Febrero de 2021Euros1520685Spain11926359,76
Marzo de 2021Toneladas1520685France1091,23
Marzo de 2021Euros1520685France9272786,71
Abril de 2021Toneladas1520685France975,72
Abril de 2021Euros1520685France9212019,58
Mayo de 2021Toneladas1520685Germany637,51
Mayo de 2021Euros1520685Germany8595398,4
Julio de 2021Toneladas1520685Germany514,96
Julio de 2021Euros1520685Germany8750124,6
Enero de 2021Toneladas65895Spain785,58
Enero de 2021Euros65896Spain12696599,79
Febrero de 2021Toneladas65897Russia396,69
Febrero de 2021Euros65898Russia3064614,07
Marzo de 2021Toneladas65899Spain1172,18
Marzo de 2021Euros65900Spain9038334,41

 

 

And what I want is the following table as a result in Power BI, so everytime I update the source .csv file this new table will update as this:

 

Date1ProductCountryToneladasEuros
Enero de 20211520685Spain464,513519652,9
Febrero de 20211520685Spain1518,8911926359,8
Marzo de 20211520685France1091,239272786,71
Abril de 20211520685France975,729212019,58
Mayo de 20211520685Germany637,518595398,4
Julio de 20211520685Germany514,968750124,6
Enero de 202165895Spain785,5812696599,8
Febrero de 202165897Russia396,693064614,07
Marzo de 202165899Spain1172,189038334,41

 

How can I do it?. thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ciervax , select Type and value and pivot them in power query

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Pivot Data(Power Query) :https://www.youtube.com/watch?v=oKByyI09Bno&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=12

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@ciervax , select Type and value and pivot them in power query

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Pivot Data(Power Query) :https://www.youtube.com/watch?v=oKByyI09Bno&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=12

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.