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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rajibmahmud
Helper III
Helper III

Formatting Uploaded Data

Hi All,

 

Currently I am getting automated sales data from a system to PowerBI in below format. However I need to transform data into a different format where Quarter will be in Column instead of rows. As rest of the data feed is in that format. Its not possible to do it in excel before data feed as the amount of data is huge, and I dont have option to deploy someone to do data clean up.


Can someone help?

 

Current format

RegionYearQuarterValue
USA2014Q1100
USA2014Q250
USA2014Q3251
USA2014Q4213
USA2015Q1155
USA2015Q2123
USA2015Q35
USA2015Q461

 

Desired format

 

RegionYearQ1Q2Q3Q4
USA201410050251213
USA2015155123561
2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @rajibmahmud,

 

In the Query Editor select the Quarter column and then Pivot columns and select the Value column in the options you will get the desired result:

 

Pivot_Column.png

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hi @rajibmahmud,

 

You can do this in one of two ways in the query editor:

 

1 - Create a new column with a text like this:

Column "TEXT" & [Column]

Then delete the previous column and keep this

This can be done by the column from example and it pretty easy to achieve:

 

Column form example.png

 

2 - Do a Replace in the specific column for the text that you want to add:

If all your rows start with 1 you can do a replace of 1 for Text1

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @rajibmahmud,

 

In the Query Editor select the Quarter column and then Pivot columns and select the Value column in the options you will get the desired result:

 

Pivot_Column.png

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks a lot. @MFelix

 

Another query I have which might going to make my life easier.

 

Is there any option to add ' infront of all text in a specific column from query editor during data load? or do a look up and replace the text of the column with new vlookup data?

Hi @rajibmahmud,

 

You can do this in one of two ways in the query editor:

 

1 - Create a new column with a text like this:

Column "TEXT" & [Column]

Then delete the previous column and keep this

This can be done by the column from example and it pretty easy to achieve:

 

Column form example.png

 

2 - Do a Replace in the specific column for the text that you want to add:

If all your rows start with 1 you can do a replace of 1 for Text1

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Please take a look at the screen below:

 

addcolumn.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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