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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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]))

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.