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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Data lines with 0 values displayed anomalies when selected using a slicer

I am using the line chart to display a trend of defects by dept. Some depts has 0 defects but still required to be displayed in the chart.

To do this, I added each dept defects count into the Y-axis.

However, when selected a dept that has 0 value, 2 anomalies occurred:

1. Instead of displaying the selected dept, it shows the first dept. The correct dept is shown is selected a dept with values.

2. The 0 on the line appeared more then 1 as shown in the picture.

 

Are there alternate settings to resolve the above issues?

Thank you in advance!

fa857256-e6fd-412a-8e53-3501ce1da862.jpg

Line Chart 2.jpg

4 REPLIES 4
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Anonymous,

 

have you created a measure, or are you using an implicit measure? Do you have a date-table?

I am not able to recreate your issue, but you could try to write a measure like this:

Measure = SUMX('Table',if(ISBLANK('Table'[value]),0,'Table'[value])) 

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Anonymous
Not applicable

Hi @sturlaws ,

 

I am getting the data from a table like the following:

Table.jpg

 

The following columns are selected for the Y-axis:

Y-axis values.jpg

 

 

 

 

 

 

 

Cheers!

How have you created your slicer?

Anyway, the your table is not optimal for what you are trying to do. I would place department on rows instead, like this:

sturlaws_0-1670496038393.png

 

Anonymous
Not applicable

Hi @sturlaws ,

 

I use the "Dept" as the field for the slicer.

 

Sorry, I missed showing that in the table screenshot.

Table1.jpg

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.