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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

stacked area chart distorted: can we treat blank as 0?

Hello,

 

I am displaying data on a chart on 4 categories (1 color each below). On some days I have no data for some categories

Instead of being treated as 0, the area for the particular categories with no data jumps in a straight line to the following day that has some data - cutting through the rest of the chart in a very weird and unintuitive way.

See below:

2018-01-23_18h15_51.png

 

 

Basically the issue is the blank data which i think is not interpreted as a zero. Is it an expected behavior and is there a way to fix the visual?
(i would like to avoid forcing blank to 0 in my measure because it will then calculate a value for days that i'm not interested in)

1 ACCEPTED SOLUTION
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

In the stacked ared chart, change the type of your X-Axis from Continuous to Categorical,  this way, you will not get any area for the blank data in the chart. There is an example for your reference.

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

In the stacked ared chart, change the type of your X-Axis from Continuous to Categorical,  this way, you will not get any area for the blank data in the chart. There is an example for your reference.

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The blank (white background) areas look odd in the middle of the graph.  They appear to correspond to when the count of items is zero but instead of the total being 0 the total is blank and the chart displays a discontinuity.  How can this be avoided?

Anonymous
Not applicable

Thanks @v-yuezhe-msft it worked.

 

The axis is now displaying the dates in a long format (just like in your example). Any possibility to keep the format to the previous one?

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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