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
janstrauss1
Helper I
Helper I

How to reallocate summed values to specific categories?

Dear Power BI Community,

 

I’ve been given a data table that contains information on categorized projects and associated total budgets that I need to visualize as a pie chart like in this example. The example .pbix can be downloaded from my GitHub.

 

Screenshot 2024-04-17 173719.png

To improve the visual, I need to evenly reallocate the sum of total project budgets of the “mixed” categories (e.g. “Category1 & Category2”) to its individual single categories.

 

For example, the sum of 2.597.242.976,00 for “Category1 & Category2” needs to be evenly distributed between “Category1” and “Category2” so that eventually there will be only four categories left in the visual.

 

I was fiddling with calculated columns and measures as suggested by @v-yuta-msft in
Distributing values across categories  and by @v-rongtiep-msft  in Distributing Value into specified category but couldn’t get it to work in my case.

 

Thus, any help and suggestions are highly appreciated.

 

Many thanks in advance!

 

 

Example Data

 

ProjectNameProjectTitleMarketSegmentCategoryMarketSegmentCategoryCountProjectPartnerNameTotalProjectBudget
Project01Project01_TitleCategory11Project01_Partner14499250
Project01Project01_TitleCategory11Project01_Partner24499250
Project01Project01_TitleCategory11Project01_Partner34499250
Project02Project02_TitleCategory21Project02_Partner1449993475
Project02Project02_TitleCategory21Project02_Partner2449993475
Project02Project02_TitleCategory21Project02_Partner3449993475
Project02Project02_TitleCategory21Project02_Partner4449993475
Project03Project03_TitleCategory31Project03_Partner1470515625
Project03Project03_TitleCategory31Project03_Partner2470515625
Project03Project03_TitleCategory31Project03_Partner3470515625
Project03Project03_TitleCategory31Project03_Partner4470515625
Project03Project03_TitleCategory31Project03_Partner5470515625
Project04Project04_TitleCategory41Project04_Partner1680300395
Project04Project04_TitleCategory41Project04_Partner2680300395
Project05Project05_TitleCategory1 & Category22Project05_Partner11298621488
Project05Project05_TitleCategory1 & Category22Project05_Partner21298621488
Project06Project06_TitleCategory1 & Category32Project06_Partner1743644825
Project06Project06_TitleCategory1 & Category32Project06_Partner2743644825
Project06Project06_TitleCategory1 & Category32Project06_Partner3743644825
Project07Project07_TitleCategory1 & Category32Project07_Partner17153285
Project08Project08_TitleCategory3 & Category42Project08_Partner12231710
Project09Project09_TitleCategory2 & Category42Project09_Partner11999585
Project09Project09_TitleCategory2 & Category42Project09_Partner21999585
1 ACCEPTED SOLUTION
janstrauss1
Helper I
Helper I

I just managed to solve my own problem using the following approach 😊:

 

  1. Split column 'MarketSegmentCategory' by Deliminiter '&' in Power Query
  2. Unpivoted generated columns in Power Query
  3. Add calculated column to divide 'TotalProjectBudget' by the 'MarketSegmentCategoryCount' in Power Query
  4. Use SUMMARIZE function (DAX) to return summary tables for my original table and the one with split categories

 

Screenshot 2024-04-17 171416.png

 

An updated example .pbix file can be downloaded from my GitHub.

View solution in original post

2 REPLIES 2
janstrauss1
Helper I
Helper I

I just managed to solve my own problem using the following approach 😊:

 

  1. Split column 'MarketSegmentCategory' by Deliminiter '&' in Power Query
  2. Unpivoted generated columns in Power Query
  3. Add calculated column to divide 'TotalProjectBudget' by the 'MarketSegmentCategoryCount' in Power Query
  4. Use SUMMARIZE function (DAX) to return summary tables for my original table and the one with split categories

 

Screenshot 2024-04-17 171416.png

 

An updated example .pbix file can be downloaded from my GitHub.

Hi @janstrauss1 

 

Congratulations!
I'm sure there are quite a few people who have been confused by this question.
Thank you very much for sharing.

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.