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
viniciusz
Frequent Visitor

Transform month(date) columns to rows

Hello to you that reads this!

 

I'm having a hard time with this situation, any suggestion will be very appreciate!

 

This dataset I'm working on came with the sales values splitted in "month columns", like this:

viniciusz_3-1599613226012.png

 

How is the best way to work with it? I can't filter it by month, I can't work with date intelligence 😢 .

 

I guess the best way is to transform this columns into rows, kind like this:

viniciusz_4-1599613268345.png

 

Am I right? If so, PowerBI does this? The "Columns to Row" option didn't seems to work like this.

 

Best regards! Stay safe.

Vinicius.

1 ACCEPTED SOLUTION
edhans
Super User
Super User

  1. Go to Transform Data
  2. Click on the IDSales and NameProd columns
  3. Right-click and select "Unpivot Other Columns"

That will normalize the data for you.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

4 REPLIES 4
viniciusz
Frequent Visitor

It works ! Thank you @edhans and @amitchandak .

Great @viniciusz - I could tell you knew what to do when you were looking for a columns to rows transformation, but just needed a bit of help on how Power Query does that. The Unpivot is one of the most powerful and most common transformations I use.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Super User
Super User

  1. Go to Transform Data
  2. Click on the IDSales and NameProd columns
  3. Right-click and select "Unpivot Other Columns"

That will normalize the data for you.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.