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! Request now

Reply
walker8888
Helper II
Helper II

Getting rid of white spaces in Matrix and gaps in clustered bar chart

Hey, so I have a clustered and matrix chart. In my clustered chart, anything that is showing 0% and below I am filtering it out and not showing it. The problem with this is that I now have a gap between my bars. I want to close this gap but have been having a hard time doing so. Is there a trick to this? Also on the same page I have a Matrix chart and that is going perfect, except that I have a lot of white space in some of them due to there not being enough wording I guess. Can this be fixed? Thanks for your help in advance.

 

walker8888_0-1665090101454.png

 

9 REPLIES 9
lukiz84
Memorable Member
Memorable Member

It's very strange, are you able to share your pbix file?

 

 

BR

I am not able to through here? Can you do email?

 

lukiz84
Memorable Member
Memorable Member

You have to return BLANK() in your Measures for zero values, then they won't show up. Maybe you could share the DAX code for your measures?

This is my measure code

 

Device_Software_Measure =
DIVIDE (
CALCULATE (
SUM ( 'gDS_C3'[Value] ),
FILTER (
ALLSELECTED ( 'gDS_C3' ),
[Attribute] = MAX ( 'gDS_C3'[Attribute] )
&& [Priority] = MAX ( 'gDS_C3'[Priority] )
)
),
CALCULATE (
SUM ( 'gDS_C3'[Value] ),
FILTER ( ALLSELECTED ( 'gDS_C3' ), [Attribute] = MAX ( 'gDS_C3'[Attribute] ) )
)
)

ok, please try:

 

Device_Software_Measure =
VAR result = 
DIVIDE (
CALCULATE (
SUM ( 'gDS_C3'[Value] ),
FILTER (
ALLSELECTED ( 'gDS_C3' ),
[Attribute] = MAX ( 'gDS_C3'[Attribute] )
&& [Priority] = MAX ( 'gDS_C3'[Priority] )
)
),
CALCULATE (
SUM ( 'gDS_C3'[Value] ),
FILTER ( ALLSELECTED ( 'gDS_C3' ), [Attribute] = MAX ( 'gDS_C3'[Attribute] ) )
)
)

RETURN IF(result <> 0, result)

Thanks but still gives me that gap 

walker8888_0-1665327958325.png

 

please try to set a filter on the chart, add the measure to the filters and set "is not blank"

I think we are almost there. When I do this it still gives me a gap. I think I may be doing something wrong. 

walker8888_0-1665418405687.png

 

Hi,

 

thats odd, when i filter Attribute to External FTE's % it works, but I think PowerBI does always shows the blank rows when in any other Attribute (Internal FTE's %) there are numbers. I'm sorry, it seems I can't help you out on this one 😞

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