Forum Discussion

ME_1976's avatar
ME_1976
Frequent Visitor
2 years ago
Solved

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. 

 

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

5 Replies

  • Hi ME_1976 ,

     

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

    • ME_1976's avatar
      ME_1976
      Frequent Visitor

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

       

      • MFelix's avatar
        MFelix
        Super User

        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?