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!
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.
I figured out one way of doing it, it is more a work around than anything, but you can create your normal clustered chart, and then create another clustered chart and have one data point in the table date: 2020 and net flow: -8000. you can then place the original chart in the back and place the 2nd chart on tom and then move to the correct position on the chart. You then shrink the chart as small as you can in width and place it over the 2020 date.
you also would need to turn off all the titles, and informtion for the 2nd table so they do not show up. If you turn off the responsive you can make the line thinner.
I am going to continue working on a more elegant solution, but if you like this answer then please accept this as the solution.
Check out the News & Announcements to learn more.
Microsoft received the highest score of any vendor in both the strategy and current offering categories.
Mark your calendars and join us for our next Power BI Dev Camp!
Check out our new Discover Your Career Path blog post series and get all the details.