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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
TimNYC
Helper I
Helper I

Percent Change Between Values on Line Chart

I've been asked to show % change between years on the following chart. At present there are two lables per X-axis value because there are two years included in my legend. Is it possible to have one lable per X-axis value, and that lable be the % change from 2019 to 2020? Or is there a better way to show this data?

 

example.png

 

Thank you,

 

Tim

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @TimNYC 

I think the best way is add it into Tooltip of line chart.

and there is another workaround for you refer to:

Step1:

Use combo chart instead of line chart in the report.

https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart

Step2:

Create different measure by year, eg.

2019 = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019))

2020 = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2020))

Step3:

Drag these measures into line values.

Step4:

Create a Percent Change measure like below:

Difference = 
var lastyear=  CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table'[Year]), 'Table'[Year] = MAX ( 'Table'[Year] ) - 1 )
    )
return

DIVIDE(CALCULATE(SUM('Table'[Value]))-lastyear,lastyear,BLANK())

Then drag this measure into column values

Step5:

You could change the color of the column to white and custom the two Y-axis in format.

Result:

6.JPG

 

and here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi  @TimNYC 

I think the best way is add it into Tooltip of line chart.

and there is another workaround for you refer to:

Step1:

Use combo chart instead of line chart in the report.

https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart

Step2:

Create different measure by year, eg.

2019 = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2019))

2020 = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year]=2020))

Step3:

Drag these measures into line values.

Step4:

Create a Percent Change measure like below:

Difference = 
var lastyear=  CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table'[Year]), 'Table'[Year] = MAX ( 'Table'[Year] ) - 1 )
    )
return

DIVIDE(CALCULATE(SUM('Table'[Value]))-lastyear,lastyear,BLANK())

Then drag this measure into column values

Step5:

You could change the color of the column to white and custom the two Y-axis in format.

Result:

6.JPG

 

and here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vivran22
Community Champion
Community Champion

Hello @TimNYC 

 

I prefer to include such KPIs as Tooltips. It helps in keeping the visual clean.

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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