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
Sab
Helper V
Helper V

Don't show the line when no data or zero for Continuos line chart

Hello,

 

I have one measure that then put in the line chart it draws the Blue line like below. Then I have another measure that has just some datapoints of the original measure, which when I place in the chart it appears in red color. Now if for the missing values I choose blank, it draws this straight lines from the last datapoint of a period, to the first datapoint of the next period: 

 

Sab_0-1647907500211.png

 

If instead of Blank, I choose to have Zeros in the missing values, I get this other version, which is also not what I want:

Sab_1-1647907529557.png

 

So, I want something like below, BUT not to have the x-axis as Categorical, because there are a lot of data points and then the scrollbar appears, which ruins the purpose of the chart 😞

Sab_2-1647907556248.png

 

Any help please?

 

 

1 ACCEPTED SOLUTION

Hi @Sab ,

 

According to your statement, I know that you want to combine two category line charts as one and use continuos X axis. I think Power BI doesn't support us to do this. As far as I know when we choose continuos in X axis, Power BI will let your line chart show as continuos automaticlly. According to your statement, I think there are two lines in your visual, so you may use legend or add two values in value field. So two lines will show as continuos. If you choose the x-axis as Categorical, the line may show as you want, however X axis will expand and then the scrollbar appears.

 

In other charts like column chart, there may be a function named as conditional formatting which still is not supported in line chart. By this function we can change the color of the visual by some conditions or by measure. 

Currently we could only use it in column chart then change the column chart as line chart then the dot will show colors as we want.

1.png2.png

Though we couldn't use conditional format to change the line color, but it may be the best workaround currently.

 

You can vote up this idea for this function:Conditional Formatting Line Chart
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,
Rico Zhou

 

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

2 REPLIES 2
Sab
Helper V
Helper V

I guess there is no solution to this 😞

Hi @Sab ,

 

According to your statement, I know that you want to combine two category line charts as one and use continuos X axis. I think Power BI doesn't support us to do this. As far as I know when we choose continuos in X axis, Power BI will let your line chart show as continuos automaticlly. According to your statement, I think there are two lines in your visual, so you may use legend or add two values in value field. So two lines will show as continuos. If you choose the x-axis as Categorical, the line may show as you want, however X axis will expand and then the scrollbar appears.

 

In other charts like column chart, there may be a function named as conditional formatting which still is not supported in line chart. By this function we can change the color of the visual by some conditions or by measure. 

Currently we could only use it in column chart then change the column chart as line chart then the dot will show colors as we want.

1.png2.png

Though we couldn't use conditional format to change the line color, but it may be the best workaround currently.

 

You can vote up this idea for this function:Conditional Formatting Line Chart
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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.