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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Year on Year Data with Filter/Slicer on year.

Hi,

I'm very new to Power BI having troubles with DAX expressions.

I'm trying to get two different visuals where one is supposed to show current year and other one is Y-O-Y Trend , but we need a filter it could be a page filter or slicer.

Something like below.

pbi.PNG

I tried creating an measure like 

Atest = CALCULATE(sum(data[ExternalRevenue]),ALL(data[YEAR]))
But despite this it is showing data for only 2020.
 

Note: I undertand that we can use slicer and delink with the chart where trend is required but that's not what we want.

Regards,

Mohan

4 REPLIES 4
Pragati11
Super User
Super User

Hi @Anonymous ,

 

What happens when you clear slicer selections in YEAR slicer? Does it show you all years data?

 

Try modifying your measure as follows:

Atest = CALCULATE(sum(data[ExternalRevenue]),ALL(data))

 

Thanks,

Pragati

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Pragati11 ,

 

I tried the calculation you mentioned but it gives same result.

If we remove slicer the chart shows data for 2019 and 2020.

 

Regards,

Mohan

Hi @Anonymous ,

 

Just wanted to check, in your screenshot I see 2020 is selected in the slicer, therefore it shows 2020 data.

When you clear 2020 from slicer, it should show every year on the chart.

 

So, now my question is what is the requirement?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

HI @Pragati11 ,

My requirement is that we need a filter for year, and the report will have a tile for current year data and a chart that shows Y-o-Y comparison. When user selects 2020 it should data for 2020 in tile and 2019 and 2020 data in chart. They can select any year the tile should show the data for year selected and chart should show Y-o-Y comprison.

Regards,

Mohan

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.