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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to add a line chart which calculate/measure the different between 2 line chart

Hi !

I am  new to Power BI.

I have 3 Period on my query.

I want to compare the differences between a period. 

For example I have Last Year and Today Period , I want a line graph which show the differences between 2 of them.

My today period will be constant .  Any guide will be helpful to me!

cclemonq10_0-1626864847905.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you @amitchandak 

I made 3  measure based on your example.

1.TODAY Measure use as base or constant
2. Measure that will be selected by slicer for

3. Differences based measure TODAY and measure selected by slicer.

 

I put all of the measure into the line chart and all display correctly.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Ask is not very clear. But based on what I got. Measure with help from date tbale

 

 

example

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))

diff = [MTD Sales]-[last year MTD Sales]
diff % = divide([MTD Sales]-[last year MTD Sales],[last year MTD Sales])

 

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you @amitchandak 

I made 3  measure based on your example.

1.TODAY Measure use as base or constant
2. Measure that will be selected by slicer for

3. Differences based measure TODAY and measure selected by slicer.

 

I put all of the measure into the line chart and all display correctly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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