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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to create a % from a single column value

Hi All,

 

I kindly need your help to solve my problem. Currently I have data like below table:

List of Data.PNG

 

and i would like to create a report such as below template:

 

Report Template.PNG

 

The problem that I have is related to contribution %. Actually it is a simple calculation from total gross sales. For "SKU Contribution", the calculation is gross sales per SKU/gross sales product category which means the when the % per SKU summed up, the total % for every product category is 100%. Meanwhile for Channel Contribution calculation is gross sales contribution by channel by sku or by product category/total gross sales.

 

Can  anyone help me explaining how to create such report template in power BI? If i should use custom column, kindly explain how to create the code.

 

I really appreciate all of your comments.

 

Thank you

 

1 REPLY 1
HotChilli
Super User
Super User

Create 2 measures

Gross Sales Amount = SUM(Table1[Gross Sales]) 

Contribution by SKU = [Gross Sales Amount] / CALCULATE(SUM(Table1[Gross Sales]), ALL(Table1[Type]))

Pull 'Gross Sales Amount' into the Values well of a matrix.

Pull 'Contribution by SKU' twice into the Values well of the matrix. For the second one, right-click and choose 'Show value as '->Percent of Row Total.   Then rename the second one 'Contribution by Channel'

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.