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

complication with depivotizing

Hi

 

I have a planning list, that look like the following. 

To use it as monthly planning values, i can just depivotize it in power query and use it perfectly. 

Fabrizio_0-1649678135613.png

 

There is one line per Internal Order. The order is used as key to connect other tables. This is the many side of the relation. So all good. 

 

 

But now i have received the request to split the internal orders according to an "initiative mapping", That breaks up most of the Internal Orders into several "initiatives". 

The spreadsheet now looks like this:

 

Fabrizio_1-1649678272954.png

 

 

The desired outcome for my PBI report would be like this, example based on Internal Order 1. 

 

Fabrizio_2-1649678330957.png

 

I managed to get there with a workaround, i created one 12 months table for each initiative, loaded them into pbi, depivotized and appended them. But i would like to solve this without having to expand my excel by that many columns. Maybe there is a way this could be solved in Power Query, or with DAX? 

 

Thanks a lot for your support. 

 

Best Regards

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Fabrizio , Take the first 10 columns in the second one and unpivot the columns one to 8

 

Remove first 8 and unpivot the month in another table.

 

merge the two -  internal order number from the second table and the unpivoted order number using left join (second to first)

 

Now you can multiple Percent with number

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

View solution in original post

2 REPLIES 2
Fabrizio
Regular Visitor

@amitchandak  Thanks for your immediate solution. Works perfectly! Thank you so much for your help.

amitchandak
Super User
Super User

@Fabrizio , Take the first 10 columns in the second one and unpivot the columns one to 8

 

Remove first 8 and unpivot the month in another table.

 

merge the two -  internal order number from the second table and the unpivoted order number using left join (second to first)

 

Now you can multiple Percent with number

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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.