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! Learn more

Reply
matrix_user
Helper III
Helper III

Latest year & Previous Latest Year - Filtered by Report Year & Quarter.

I am trying to display in a clustered column chart visual the current/latest year data as well as previous latest year data but govern by a "Report" year & quarter.

 

If I select Report year "2022" and "Qrt 4", I want it to filter to the current and previous data based on Report years. For example, my results on my visual would be " 1" (with 2011 being the latest year data on record) and "3" (with 2010 being the latest year data on record)

 

If I select Report year "2021" and "Qrt 4", my results on my visual would be " 3" (with 2010 being the latest year data on record) and "2" (with 2011 being the latest year data on record).

 

 

matrix_user_0-1683203741093.png

 

I am currently using the following measure:

Latest year & previous latest year = VAR ReferenceDate = MAX ('Date'[Date])

VAR PreviousDates = DATESINPERIOD (

        'Previous Date'[Date], ReferenceDate, -2, YEAR )

VAR Result = CALCULATE ( [Total Confirmed],

        REMOVEFILTERS ( 'Date' ),

        KEEPFILTERS ( PreviousDates ),

        USERELATIONSHIP ('Date'[Date],'Previous Date'[Date]))

RETURN Result

 

If anyone could help - that would be appreciate.

 

https://drive.google.com/drive/folders/1OtvkxXd8mnAXSSGGwW0xi8yvb_NJRbf1?usp=sharing

 

https://www.dropbox.com/scl/fo/fsuaprxpodazygfe6excd/h?dl=0&rlkey=2wkn4jgx3fqtcd3pjmiqki7g0

 

Thank you.

 

2 REPLIES 2
matrix_user
Helper III
Helper III

Thank you Ibendlin,

I have included calculated columns. I am still lacking the ability to pull data from previous report for sameperiod.

lbendlin
Super User
Super User

If your fact data doesn't have date level granularity then you can designate a substitute date, for example the first day of the year, or the first day of the quarter.  That will allow you to properly link to the Calendar table, and to use the built-in time intelligence functions.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.