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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to Adjust the Percentage in a Bar Chart

Hello, 

 

I have a data set and I've simplified a sample data sheet like this: 

 

DateCustomerVolume
Sep-19A18
Sep-19B15
Sep-19C28
Oct-19A20
Oct-19B10
Oct-19C30
Nov-19A25
Nov-19B8
Nov-19C20
Dec-19A30
Dec-19B15
Dec-19C15

 

It’s easy to get percentage data by month (in this case: percentage by column) in Matrix. See below:

test 1.PNG

I also want to create a bar chart with a trend line by month using the percentage numbers. When I chose the “show value by percentage” in the bar chart, I only saw “by grand total” option. So instead calculating the percentage by month, it’s calculating by customer, see below. You can see the percentage number of A is 19.35% not 29.51% in the Matrix. I don't want that. 

test 2.PNG

 

Can someone help me out here? I’ve been stuck here for quite a while. Tried a few measures, it didn’t work.

 

Thank you in advance!!!!

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario.

Table:

d1.png

 

You may create a measure and then go to 'Modeling' ribbon, format it as follows.

Percentage of column value = 
DIVIDE(
    SUM('Table'[Volume]),
    CALCULATE(
        SUM('Table'[Volume]),
        ALLEXCEPT('Table','Table'[Date])
    )
)

 d2.png

 

Result:

d3.png

 

Best Regards

Allan

 

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

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario.

Table:

d1.png

 

You may create a measure and then go to 'Modeling' ribbon, format it as follows.

Percentage of column value = 
DIVIDE(
    SUM('Table'[Volume]),
    CALCULATE(
        SUM('Table'[Volume]),
        ALLEXCEPT('Table','Table'[Date])
    )
)

 d2.png

 

Result:

d3.png

 

Best Regards

Allan

 

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

amitchandak
Super User
Super User

This how you can try. But it will work when you separate out the customer in a new table

 

option1 = sum(table[Volume])/calculate(table[Volume],all(table[Customer]))
//Customer in new table
option2 = sum(table[Volume])/calculate(table[Volume],all(Customer))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@Anonymous Try upivoting Customer & Volume columns in 'Transform Data' section &

Then use the following dax & have it in value of the chart: I am assuming the volume column is count of a key column

Monthly % =
var p = CALCULATE(DISTINCTCOUNT(Table[contact_key]),Table[Value]="A")
var l = CALCULATE(DISTINCTCOUNT(Table[contact_key]),Table[Value]="B")
var m = CALCULATE(DISTINCTCOUNT(Table[contact_key]),Table[Value]="C")
var s = p+l+m
return CALCULATE(DISTINCTCOUNT(Table[contact_key]),FILTER(Table,Table[Value]=MAX(Table[Value]) && Table[Month]=MAX(IRS_Sessions1[Month])),FILTEr(Table,Table[Value] in {"A","B","C"}))/ CALCULATE(s,filter(all(Table),Table[Month]=MAX(Table[Month])))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors