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

Stacked column chart breakdown with a measure

Hi. I created a stacked column chart to show customer credit (in dollars) over time. On the y-axis are dollars, and on the x-axis is the year. Each bar is broken down by reason the customer was credited.

 

Here is a simplified example of the chart:

 

bar_chart.PNG

Here is the underlying data:

 

data.PNG

 

I would like to modify the column chart so that all the amounts for a given year are normalized by SUM(SALES) for that year. The result would be a chart similar to the one shown above, except with percent (of sales) on the y-axis.

 

I tried to do this by creating a measure that performs Credit/Sales. However, if I use this measure as the 'Values' field in my column chart, I lose the ability to break down the column by reason. In order to see any data I must remove the 'Legend' field. 

 

Is there a way to show Credit/Sales broken down by reason in my column chart? Thank you.

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @Anonymous ,

Based on my test, you could refer to below fromulas:

Create a calculated column:

1.PNG

Create below measure:

Measure = CALCULATE(SUM(Table1[Credit]))/CALCULATE(SUM(Table1[Column]))

Result:

2.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-danhe-msft
Employee
Employee

Hi @Anonymous ,

Based on my test, you could refer to below fromulas:

Create a calculated column:

1.PNG

Create below measure:

Measure = CALCULATE(SUM(Table1[Credit]))/CALCULATE(SUM(Table1[Column]))

Result:

2.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

 

Community Support Team _ Daniel He
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.