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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
ME_1976
Frequent Visitor

Adding a Constant Line Pulls Historic Data But It's Blank

Hi folks,

Hope you can help. 

I'm new(ish) to Power Bi, being self taught via videos, reading and good old fashioned trial and error. 

I've created a line and stacked chart, with a constant line for the SLA target (10 days).

This is linked to a date slicer to adjust accordingly. 

Prior to adding the constant line it worked perfectly, however, now I've added the line it adds the previous years month but with blank data and I've not changed the slicer settings (there is data available for 2023). Once I remove the constant line, it reverts back to normal and no issues. Can someone please assist? I've included screen prints of the graph in original state and how it switches once you add the constant line. Thanking youin advance 

 

Without constant line the data works. 

Without Constant Line.JPG

 

When constant line is added, it randomly adds last years month with blank data. 

Constant Line.JPG

1 ACCEPTED SOLUTION

Hi @ME_1976,

 

If you go to the options of the chart one of the last options is reference line, there you add a new line as a constant, use your measure on that and everything should work

 

 https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

5 REPLIES 5
MFelix
Super User
Super User

Hi @ME_1976 ,

 

How are you setting up the flat line? is it a measure? Can you share the syntax please.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I just added a new measure using 'constant line = 10' then added it to Line y-axis.

 

Hi @ME_1976 ,

 

I did some tests on my side and adding a measure on the chart it works correctly and nothing is added.

 

How are the other two metrics calculated? I believe that you cam have a filter context transition that is not getting picked up by this new measure.

 

Is the calendar table related with your fact table?

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi, I'm not 100% sure what you mean (still getting to grips with Power Bi and the technical wording). The date range is within a slicer, with the dates running continuously for each end of month and forms part of the data. If that makes sense. I'm mindful of the data within the document, so I've attached screen grabs of the settings to see if that helps answer the question.

 Capture2.JPGCapture1.JPG

Hi @ME_1976,

 

If you go to the options of the chart one of the last options is reference line, there you add a new line as a constant, use your measure on that and everything should work

 

 https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors