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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.