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
dipanshu_mittal
New Member

Need Help in Comparing data on line chart using set of slicers

Hi All,

I need help in creating a power BI desktop report for comparing data on a line chart based on the selection of year & month (can select multi year(s) & month(s) ) from the slicer and there are a few more slicers (can multi-select the values).

 

Data is represented on line chart visualization.

 

Problem Statement: When I am selecting multiple years or months data is summed up in a chart. Need to visualize the comparison between the year or month if multi-selected.

 

Thanks in advance

1 REPLY 1
amitchandak
Super User
Super User

@dipanshu_mittal , when you select multiple values, what do you plan to compare with

 

if you want to compare with last year, you can have a measure like

 

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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