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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://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/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.