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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
sakarim
Frequent Visitor

Conditional data labels on graphs

Hi,

 

I work with health data and have to suppress counts of less than 5 on graphs. I am looking for a solution to display a data label on the chart once filters are applied to show "<5" where counts are less than 5 rather than it being omitted or blank (see example picture below). Is there a way to do this?

sakarim_0-1618336788655.png

 

 

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi, @sakarim 

One way to achieve this is fixing the number format by using Tabular Editor in Power BI.

Please check the below picture and the sample pbix file's link down below.

I created a calculation group inside Tabular Editor in Power BI Desktop.

If you go into the Tabular Editor, and if you check the "Format Striing Expression", you can see how I wrote DAX.

 

Picture7.png

 

https://www.dropbox.com/s/gbzuh1x2f2miism/Sakarim.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

Hi, @sakarim 

Thank you for your feedback.

I am not sure if I understood your last question correctly, but please check the below picture and the sample pbix file's link down below.

 

Picture2.png

 

https://www.dropbox.com/s/7mrjew3l7o3vhft/Sakarim.pbix?dl=0 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

6 REPLIES 6
Jihwan_Kim
Super User
Super User

Hi, @sakarim 

One way to achieve this is fixing the number format by using Tabular Editor in Power BI.

Please check the below picture and the sample pbix file's link down below.

I created a calculation group inside Tabular Editor in Power BI Desktop.

If you go into the Tabular Editor, and if you check the "Format Striing Expression", you can see how I wrote DAX.

 

Picture7.png

 

https://www.dropbox.com/s/gbzuh1x2f2miism/Sakarim.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

worked, thanks! Is there a way to have 0 not included in the <5? 

Hi, @sakarim 

Thank you for your feedback.

I am not sure if I understood your last question correctly, but please check the below picture and the sample pbix file's link down below.

 

Picture2.png

 

https://www.dropbox.com/s/7mrjew3l7o3vhft/Sakarim.pbix?dl=0 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

exactly right, thank you so much!😁

vanessafvg
Community Champion
Community Champion

are you wanting to group everything under 5 in one bucket and have its own bar to display?  is that what you asking?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




For any variable where the count is less than 5, I just want a data label that shows <5 rather than it being blank. For example, the picture I included shows a breakdown by age category and you can see the 55-64 age range for the pink bar is blank because it is less than 5 for the category. I want there to be a label that says "<5".

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.