Forum Discussion

armchairexpert's avatar
armchairexpert
Helper III
8 months ago
Solved

Target Line Based on What-If Parameter

Hi,

 

I have a line chart with test Carbon Emission data from 2021 to 2025 in my Power BI report. The objective is to go carbon neutral by 2050.

 

I want to show a target line on the line chart. I want to parameterise the Target Year. So when the user selects a year on the parameter, on the chart it will dynamically show the target line between 2021 and the year the user selected. For example if the user selects 2030 on the parameter, the line should show between 2021 and 2030 so that the user will know we are reaching the CO2 target.

 

If the user selects a year in the past, then it should show blank.

 

Can someone please help me create a measure for the target line? I am trying to attach my .pbix file but not sure how to do that as it allows only photos and videos. 

 

Thanks for your help.

 

7 Replies