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
deathseeker
Regular Visitor

12 columns => 2 columns (SQL command or Unpivot?)

Hello!!!

 

I have a table connected to SQL that outputs a column for each month.

For working it better in Excel, I need to transforme that 12 columns to only 2... a first one for the values and the second for the respective month (that at this moment are the column titles).

 

In your opinion, which will be the better option (or if it dependes, advantages and desavantages):

a) a SQL command (not familiar to me);

b) use unpivot in Query Edit

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Using the Unpivot feature in the Query Editor should work, but just keep your eye on how long it takes.  If it can handle the transformation in an acceptable time, this will be the easist way to manage it.

 

If you are talking big data volumes then SQL will be faster, but the SQL will be more complex.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
Employee

Using the Unpivot feature in the Query Editor should work, but just keep your eye on how long it takes.  If it can handle the transformation in an acceptable time, this will be the easist way to manage it.

 

If you are talking big data volumes then SQL will be faster, but the SQL will be more complex.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

 

So SQL it may be the best solutions in the long term, because I wil not to worry if the Query Editor handles diferent databases. 

 

Thank you so much.

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.