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
mmossel
Microsoft Employee
Microsoft Employee

Bar chart does not fill up all available space

Hi,

 

How can I make sure that the bar charts are more evenly distrubuted from top to bottom? The data is in "Values" and I have played around with all settings that have any effect (minimum category width and inner padding). If I drag all the data from Values to Axis then it all disappears.

 

Thank you so much!

 

marcmarijn_0-1601969410556.png

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @mmossel , there is another way to achieve a bar chart like below. Is this what you like?

v-jingzhang_0-1602125600643.png

 

First create measures like below:

M SfB Usage % = SUM(Sheet1[SfB Usage %])

M Yammer Usage % = SUM(Sheet1[Yammer Usage %])

M SPO Usage % = SUM(Sheet1[SPO Usage %])

… And so on

 

Second, create a measure list table and enter names in it:

10082.jpg

 

Then, use SWITCH function to create a master measure to be used as value in the chart.

Usage % = SWITCH(SELECTEDVALUE('MeasureList'[Order]),1,[M SfB Usage %],2,[M Yammer Usage %],3,[M SPO Usage %],4,[M Exo Usage %],5,[M ProPlus Usage %],6,[M Teams Usage %],7,[M EMS total usage %],8,[M AAD %],9,[M Win 10 Usage %])

 

Finally, put the master measure in the bar chart as value and measure name as axis, then you will get the bar chart.

v-jingzhang_2-1602125600650.png

 

You can also change the color for each bar as you like. For more detailed guidance, please refer to this link https://radacad.com/dax-measure-in-the-axis-of-the-power-bi-report

 

Best Regards,

Community Support Team _ Jing Zhang

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

View solution in original post

10 REPLIES 10
v-jingzhang
Community Support
Community Support

Hi @mmossel , there is another way to achieve a bar chart like below. Is this what you like?

v-jingzhang_0-1602125600643.png

 

First create measures like below:

M SfB Usage % = SUM(Sheet1[SfB Usage %])

M Yammer Usage % = SUM(Sheet1[Yammer Usage %])

M SPO Usage % = SUM(Sheet1[SPO Usage %])

… And so on

 

Second, create a measure list table and enter names in it:

10082.jpg

 

Then, use SWITCH function to create a master measure to be used as value in the chart.

Usage % = SWITCH(SELECTEDVALUE('MeasureList'[Order]),1,[M SfB Usage %],2,[M Yammer Usage %],3,[M SPO Usage %],4,[M Exo Usage %],5,[M ProPlus Usage %],6,[M Teams Usage %],7,[M EMS total usage %],8,[M AAD %],9,[M Win 10 Usage %])

 

Finally, put the master measure in the bar chart as value and measure name as axis, then you will get the bar chart.

v-jingzhang_2-1602125600650.png

 

You can also change the color for each bar as you like. For more detailed guidance, please refer to this link https://radacad.com/dax-measure-in-the-axis-of-the-power-bi-report

 

Best Regards,

Community Support Team _ Jing Zhang

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

Pragati11
Super User
Super User

Hi @mmossel ,

 

If I understand your query correctly, you want to ask why the values bars in ORANGE are not distributed in a better way as compared to the one highlighted in RED as shown below:

Pragati11_0-1601970238665.png

 

The reason for this is the top bars values are small when compared to the highlest value on the bottom bar 21.21%.

 

Have you tried modifying your scale to LOG as shown below:

Pragati11_1-1601970475785.png

 

Thanks,

Pragati

 

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi @Pragati11

 

Thank you for your quick response.

 

That's not what I was trying to say, sorry for being unclear! I meant that there is much white space above and underneath the horizontal charts. Why the first blue bar show at the height of legend "SPO Usage" and not at "SfB Usage"? Do you understand what I'm trying to say?

 

marcmarijn_1-1601970903340.png

 

 

Let me know! 

Hi @mmossel ,

 

Yes now I understand the issue.

 

Is it possible for you to share the pbix file as I am not able to reproduce the exact chart at my end?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Sure, that's so nice of you! How can I best share the file with you? My organization does not allow to share a link to my cloud storage. Can you maybe share your email address in a private message?

Hi @mmossel ,

 

You can create a dropbox link for your pbix file or message me privately or create a WeTransfer link.

Do make sure to remove any sensitive information from your pbix file.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 

 

https://we.tl/t-d0rr9Ch8Rg

 

Can't send any more private messages it seems, so here it is! Thank you again!

Hi @mmossel ,

 

The reason why you see a lot of white space in your chart is you haven't got anything under AXIS section. You have jut got measures in your VALUES section. See below:

Pragati11_0-1601973497572.png

Therefor a lot of space is shown. Try to move some kind of categorical column to the AXIS section, the white-space will go.

 

Something like this:

Pragati11_1-1601973710715.png

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 

 

Thanks, but when I add something to Axis the bars only become smaller, as such:

 

marcmarijn_0-1601978674441.png

 

HI @mmossel ,

 

You will have to add a Categorical column to your AXIS section. So, this categorical column should be of TEXT type like I have added in my chart. 

 

So these fields for AXIS section could be  Month-Year column, or a text column like Country name.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

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.

Top Solution Authors