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
Caiz
Frequent Visitor

Hide values in bar chart where value is 0

I am using a clustered bar chart to display the Sick Days taken by different teams.

 

Here is a sample of my table:

 Sales TeamDevelopment TeamOperations TeamProduct Dev Team
Sick days taken0320

 

My chart is currently showing all 4 teams, even those with the value of 0. How do I get it to only showing teams with more than 1, and not show the Sales & Product Dev Team on the chart?

 

I've tried look through a few forums and can't find a solution, I also can't do an advanced filter for some reason on e.g. "Sales Team" to only show values more than 0.

 

Thanks for your help.

4 REPLIES 4
amitchandak
Super User
Super User

@Caiz , If they column the only thing you can do is

 

Sales Team leaves = var _1  = calculate(sum(Table[Sales Team]))

if(_1 =0 , blank(),0) //You need to create for other three

 

If the team is column value then

Team leaves = var _1  = calculate(sum(Table[Team]))

if(_1 =0 , blank(),0)

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

Hi @amitchandak , I am getting an error for the following query:

Australia Sales Team SL = var _1 = calculate(sum('Sick Days'[Australia Sales Team]))if(_1 =0, blank(),0)))
 
Error: The syntax for 'if' is incorrect. (DAX(var _1 = calculate(sum('Sick Days'[Australia Sales Team]))if(_1 =0, blank(),0))))).
 

@Caiz , Try like

 

Australia Sales Team SL =
var _1 = calculate(sum('Sick Days'[Australia Sales Team]))
return
if(_1 =0, blank(),0)

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

@amitchandak Unfortunately it's still showing this new measure in the chart even though the value is 0

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.