Forum Discussion
Missing marker in line chart
Hi there,
I'm having trouble with the below line chart:
As you can see, there is no marker for August. This is because for the Orange series, the count was 0 for August, but I would still like there to be a marker so the line doesn't get disconnected. Is there any way to do this?
Hi justinepolanic ,
Thanks for reaching out to the Microsoft fabric community forum.Please try using this DAX measure
Count (With Zero) = COALESCE(SUM('Data'[Count]), 0)
Uploaded the sample .pbix for reference.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
12 Replies
- pbiuserukResolver IV
Hi,
There isn't an actual way to do this unless you set the minimum value of the x axis to something less than 0 - e.g. you could set it to -1 and then it will the whole line.
Bit annoying because I've been frustrated with this aswell. Alternatively, you could maybe try to change the count to something like 0.01 and see if that works - although, you may end up misleading users if they hover over it and see that value.
Hope that helps.- justinepolanicRegular Visitor
Thank you for your quick response!
I had the same thought of changing the minimum value to -1, but unfortunately it didn't resolve the issue for me. Is there another setting I need to adjust in order for that to work?
- MasonMASuper User
Normally the issue happens because Power BI doesn’t plot a data point when that (Month, Series) pair doesn’t exist in the result set, even if the logical count is 0.
To fix it, ensure your visual includes all series-month combinations (via a series table or “Show items with no data”) and your measure returns 0 instead of BLANK by using COALESCE( <your Measure>, 0 )
- Tahreem24Super User
justinepolanic Workaround is to create a measure by adding +0 which will replace blank row with 0 and then it will appear with marker on the line chart.
MEASURE = Table[ColumnName] + 0
- justinepolanicRegular Visitor
Hi there,
Thank you for your response!
I tried your suggestion but am getting an error message after I enter the formula that says, "A single value form column 'Issue Category' in table 'Work Orders' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result".
This is how I've typed the formula: Measure = 'Work Orders'[Issue Category] + 0
- Tahreem24Super User
justinepolanic What's the data type of Issue Category column? It shouls be numeric data type (whole number /decimal number)
- PBIGuy25Frequent Visitor
Is it possible for you to upload an example PBI? I can look at your data and measures and maybe figure out something.
- v-nmadadi-msftCommunity Support
Hi justinepolanic ,
Thanks for reaching out to the Microsoft fabric community forum.Please try using this DAX measure
Count (With Zero) = COALESCE(SUM('Data'[Count]), 0)
Uploaded the sample .pbix for reference.
I hope this information helps. Please do let us know if you have any further queries.
Thank you- justinepolanicRegular Visitor
Hi there,
Thank you so much! Part of my problem was that I didn't have the data in "Issue Category" represented as numerical. I added a column beside "Issue Category", used '1' to represent each entry, and the DAX measure you gave me worked!