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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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