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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MEFOX
Helper III
Helper III

Stacked Column Chart - removing axis items if the value field contains blank or zero

The description in the axis should not show up if there isnt a value greater then 0. Can some one tell me how to prevent the axis description from appearing? thanks

 

MEFOX_0-1630096317411.png

 

 

 

2 ACCEPTED SOLUTIONS
sevenhills
Super User
Super User

Can you try in the filters, advance filtering, is greater than zero?

View solution in original post

Hi,

Why not just this?

Total Contacts = DISTINCTCOUNTNOBLANK('Shared FactEventHistory'[ContactID])

Anyways, if you must show a 0, then try this measure

Total Contacts = COALESCE(DISTINCTCOUNTNOBLANK('Shared FactEventHistory'[ContactID]),0)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
daxer-almighty
Solution Sage
Solution Sage

It's very easy. You have to create a measure that will return 1 if you want to see the value and 0 if not. Then use this measure in the Filter Pane of the visual with a suitable condition.

 

By the way, comparing a logical value to TRUE or FALSE is totally unnecessary since a logical value already is TRUE or FALSE.

sevenhills
Super User
Super User

Can you try in the filters, advance filtering, is greater than zero?

parry2k
Super User
Super User

@MEFOX what is the measure you are using for value?  Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

The measure is 

Total Contacts = if(
ISBLANK(
DISTINCTCOUNTNOBLANK('Shared FactEventHistory'[ContactID]))=TRUE(),
0,
DISTINCTCOUNTNOBLANK('Shared FactEventHistory'[ContactID]
)
)

Hi,

Why not just this?

Total Contacts = DISTINCTCOUNTNOBLANK('Shared FactEventHistory'[ContactID])

Anyways, if you must show a 0, then try this measure

Total Contacts = COALESCE(DISTINCTCOUNTNOBLANK('Shared FactEventHistory'[ContactID]),0)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.