Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Reference line for Clustered Column chart

Hi All,

 

I am trying to add a reference line after year 2020 in below clustered column chart to differentiate Past Present and Future values.

 

Y axis contains $ vale in year and X contains years.

 

I am not able to find a way to do this. Please help!

 

 

8 Replies

  • Have you tried a line and Stacked Chart or line and clustered chart visualizations?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Yes, I have tried line and stacked Chart but couldn't get the reference line after coloumn 2020.

      • moltra's avatar
        moltra
        Helper IV

        Can you post a representative table of your data?

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi   Anonymous 

    You could try this way as below:

    Create a measure as this logic

    Avg after 2020 = IF(SELECTEDVALUE('Table'[Year])>=2020,CALCULATE(AVERAGE('Table'[Net Flow]),FILTER(ALLSELECTED('Table'),'Table'[Year]>=2020)))

    In line and clustered chart visualizations, drag this measure in line values

     

    and here is sample pbix file, please try it.

     

    Regards,

    Lin