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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to display last 3 years records (in3 lines) according to single selected year value from slicer?

Hi everyone,

 

My data is like: (no date info, only "year" and "period" column)

YearPeriodColA
2021JAN13
2021FEB14
2020JAN11
2020FEB12
2019JAN9
2019FEB10
2018JAN7
2018FEB8
2017JAN5
2017FEB6
2016JAN3
2016FEB4
2015JAN1
2015FEB2

And the requirement is when user choose "2020" in year slicer, followings are displayed in a Matrix Table

YearColA
202023
201919
201815

Everything is the same except data of last 2 years are also included

 

Background:

- There are many other slicers and visuals for single-year result. Only this table will be for 3 year data. And user just want it follow year slicer (single select) automatically.

 

Approach:

Disable the interaction of this table with year slicer and then implement workaround.

There are many other filters so we are looking forward to some smart way to do it without writing a big "Calculate" table which is hard to maintain.

 

Firstly we think it will be easy but still can't make it after spending lots of time.

 

Tried some of following but still failed:

 

(1) Limit slicer based on another slicer in Power BI - YouTube

 

Use a hidden slicer (multiple slection) to control target matrix table.

However only displayed values of hidden slicer are updated. Can't achive select/de-select values automatically

 

(2) https://youtu.be/YeI_n8myE68?t=1364

 

Using simple DAX to filter year column only. As a new powerBI user, it's surprising to find such filter only works for assigned value instead of variables. Thus still no solution for our report.

Example PBIX file 

 

Does anyone has any idea to do it? Thanks so much!

 

 

 

1 ACCEPTED SOLUTION
ALLUREAN
Solution Sage
Solution Sage

https://www.dropbox.com/s/bbnt9q1wj056xf5/2021-12-19%20Forum%20Example_ALLUREAN.pbix?dl=0

 

Can you check this one

 

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

 

 




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ALLUREAN
Solution Sage
Solution Sage

https://www.dropbox.com/s/bbnt9q1wj056xf5/2021-12-19%20Forum%20Example_ALLUREAN.pbix?dl=0

 

Can you check this one

 

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

 

 




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




Anonymous
Not applicable

Well your previous solution seems the most simple and working solution although we need to create another table and slicer.

 

So I will accept your pbix as solution. Would you mind post your file again as I didn't keep the file? Sorry for the inconvenience and thanks so much for your time!

Thank you! 🙂

 

 

This link should work:

https://www.dropbox.com/s/bbnt9q1wj056xf5/2021-12-19%20Forum%20Example_%28allure-analytics.com%29.pb...

 

 




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors