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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MatthewA1
Frequent Visitor

Trying to split a value into multiple rows based on a table of categories with percentages.

Hi,

 

I have currently have 2 tables:

 

  • Sales - This is a large data table which contains sales information.
  • Percentage Table - This table has 8 different categories (these are segments) which a customer may be allocated across.

I am trying to use the percentage table allocate a portion of the sales figure to each of the categories. Im not sure on the best way to achieve what im looking for, appreciate any help which can be given.

 

Example:

 

Sales Table 

 

Customer | Amount £ | Year       | Period

1234         | £100         |2022/23 | 10

  

 

 

Percentage Table 

 

Customer | Cat 1 | Cat 2 | Cat 3 | Cat 4 | Cat 5 | Cat 6 | Cat 7 | Cat 8

1234         |70      |  0       | 0      | 0        |10       |10      | 0       |10

 

 

Expected Outcome

 

Customer | Amount £ | Year       | Period  | Category

1234         | £70           |2022/23 | 10         |  Cat 1

1234         | £10           |2022/23 | 10         | Cat 5

1234         | £10           |2022/23 | 10         | Cat 7

1234         | £10           |2022/23 | 10         | Cat 8

1 REPLY 1
DataInsights
Super User
Super User

@MatthewA1,

 

Try this Power Query solution. I added a second customer for additional testing.

 

Unpivot Category columns in Percentage Table and exclude rows with 0:

 

DataInsights_0-1677270101690.png

 

Create a new table by merging these two tables (join on Customer). In the new table, create a custom column:

 

[Amount] * ([Value]/100)

 

DataInsights_1-1677270302044.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.