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
Anonymous
Not applicable

Month name in Column

Hello, I have a table that provides information about a variety of products, the value of the quantity and the months. 

 

Example: 

 

ProductsJan Feb
Product A105
Product B27
Product C57

 

The table that comes from excel, looks a little bit like the table I am showing above but it has months for the whole year (Jan through Dec). I want to have a table that shows me this. 

 

ProductsQuantityMonth
Product A10Jan
Product B2Jan
Product C5Jan
Product A5Feb
Product B7Feb
Product C7Feb

 

The purpose of this format is to be able to have filter information by months. 

 

I am unaware if there is a way to do this in the same table. One inefficient way I found to accomplish this was to make a table for each month, unpivot the columns and create a fill down based on the column and then append the 12 different tables but this creates a lot of unnecesary tables and queries in my Power Bi.

 

Let me know if I need to clarify any information. 

2 ACCEPTED SOLUTIONS
Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

Please try following steps -

 

Step 1- Go to transform data.

 

Shishir22_0-1651081645201.png

 

Step 2- Select All columns from Jan to Dec using shift.

 

Shishir22_1-1651081704759.png

 

Step 3- Click on  unpivot columns in transform tab.

 

Shishir22_2-1651081756491.png

 

Please mark it as solution if it resolves your issue. Kudos are also appreciated,

 

Cheers,

Shishir

Cheers,
Shishir

View solution in original post

Vijay_A_Verma
Super User
Super User

Just select your Products column (if there are other columns select them also but don't select month columns) - Right click - Pivot other columns

This will introduce dynamism in your query. Hence, if you currently have only Jan through May data, any month column which comes afterward will be automatically added when refreshed.

View solution in original post

4 REPLIES 4
Vijay_A_Verma
Super User
Super User

Just select your Products column (if there are other columns select them also but don't select month columns) - Right click - Pivot other columns

This will introduce dynamism in your query. Hence, if you currently have only Jan through May data, any month column which comes afterward will be automatically added when refreshed.

Anonymous
Not applicable

Thank you, Vijay!

Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

Please try following steps -

 

Step 1- Go to transform data.

 

Shishir22_0-1651081645201.png

 

Step 2- Select All columns from Jan to Dec using shift.

 

Shishir22_1-1651081704759.png

 

Step 3- Click on  unpivot columns in transform tab.

 

Shishir22_2-1651081756491.png

 

Please mark it as solution if it resolves your issue. Kudos are also appreciated,

 

Cheers,

Shishir

Cheers,
Shishir
Anonymous
Not applicable

I was able to implement it in my data, this helps a lot. Thank you! 

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.