cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vasu538
Helper III
Helper III

Compare with current year with selected year by slicer

Hi Team,

 

Requirement: Need to Compare with current year(2020) amount vs selected year by slicer(Prior Year )(2019,2018,..) in a column chart.

 

I am having the Year slicer with the values of 2020,2019... 

For Ex: Current year : always show year 2020 amount it should ignore the slicer value

          Prior Year : What ever the value selected by slicer Ex:if we select 2019 then will compare values with 2020 and 2019 and if we select 2018 then will compare with 2020 and 2018

 

Thanks In advance,

Sid

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @vasu538 ,

 

Create a measure like this and apply it to visual level filter.

Measure = IF(SELECTEDVALUE('Table'[year])=MAX(test1[year])||MAX(test1[year])=2020,1)

V-lianl-msft_0-1607308768853.png

Sample .pbix

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @vasu538 ,

 

Create a measure like this and apply it to visual level filter.

Measure = IF(SELECTEDVALUE('Table'[year])=MAX(test1[year])||MAX(test1[year])=2020,1)

V-lianl-msft_0-1607308768853.png

Sample .pbix

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.