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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
0tk
Regular Visitor

Hide data points on line chart

I have a line chart as below,

0tk_0-1688454921323.png

Is there a way to hide data points where it's zero. I basically don't want to connect where it's  zero. In this exampl,e it should show lines till May and a single dot for the last value "YTD".

1 ACCEPTED SOLUTION
SamInogic
Super User
Super User

Hi @0tk ,

 

In Power BI Formatting properties, there is no direct option to disable the data label for 0 values as they provide option to either enable or disable the data labels.

 

But as a workaround you can use below approach,

 

If your graph is with background white colour as shown below screenshot.

 

Data1.png

We will create a custom column in the table with below DAX expression,

 

DataLabelCOlor = IF('Sample Data'[Value] =0, "White","")

Data2.png

 

Then navigate to Data Label Setting options in Format Your Visual section and find the Values area where we can give Conditional Formatting to the Data Label text.

 

Please refer to the below screenshot for the same,

Data3.png

 

Click on Conditional Formatting icon and it will open a Color – Series dialog where you can select the Format Style as “Field Value” and select the field “DataLabelCOlor” from table,

Data4.png

 

Then click Ok, now the Labels having value as 0 will be hidden and other data will be displayed.

Data5.png

 

Thanks!

Inogic Professional Services Division

Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

Drop an email at crm@inogic.com

Services:  http://www.inogic.com/services/

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

View solution in original post

1 REPLY 1
SamInogic
Super User
Super User

Hi @0tk ,

 

In Power BI Formatting properties, there is no direct option to disable the data label for 0 values as they provide option to either enable or disable the data labels.

 

But as a workaround you can use below approach,

 

If your graph is with background white colour as shown below screenshot.

 

Data1.png

We will create a custom column in the table with below DAX expression,

 

DataLabelCOlor = IF('Sample Data'[Value] =0, "White","")

Data2.png

 

Then navigate to Data Label Setting options in Format Your Visual section and find the Values area where we can give Conditional Formatting to the Data Label text.

 

Please refer to the below screenshot for the same,

Data3.png

 

Click on Conditional Formatting icon and it will open a Color – Series dialog where you can select the Format Style as “Field Value” and select the field “DataLabelCOlor” from table,

Data4.png

 

Then click Ok, now the Labels having value as 0 will be hidden and other data will be displayed.

Data5.png

 

Thanks!

Inogic Professional Services Division

Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

Drop an email at crm@inogic.com

Services:  http://www.inogic.com/services/

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.