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
sreddy47652
Helper III
Helper III

Current vs Previous year to show in matrix

Hi Team, I need some help to display current vs previous year for each category. For example i have data on below each category wise many years of data irrespectively i want to show only current and last year for each certification. Please find the below screenshot.

sreddy47652_0-1651652631407.png

 

1 ACCEPTED SOLUTION

@Anonymous please find the below url for sample data.https://docs.google.com/spreadsheets/d/1FJWoNldusCiTt-e3Qb9Nun1kO9b6-OKw/edit?usp=sharing&ouid=108356959790851675969&rtpof=true&sd=true

i want to display copleted values of current and previous year comparison.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@sreddy47652 , You can add 2 measures

 

//Only year vs Year, not a level below

This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Thanks for your reply, how ever i am trying the samethng but it's not working for me. as we don't have any date table and all columns are coming from same table. while using date column on same table it's not getting proper values.

Anonymous
Not applicable

Hi @sreddy47652 ,

 

You can create a calendar table and then create a relationship with the date column of the original table.

 

Calendar = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

If this doesn't work for you, would you mind providing some data that does not contain private information?

It makes it easier to give you a solution.

  1. Sample (dummy dataset) data as text, use the table tool in the editing bar
  2. Expected output from sample data
  3. Explanation in words of how to get from 1. to 2.

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

 

@Anonymous please find the below url for sample data.https://docs.google.com/spreadsheets/d/1FJWoNldusCiTt-e3Qb9Nun1kO9b6-OKw/edit?usp=sharing&ouid=108356959790851675969&rtpof=true&sd=true

i want to display copleted values of current and previous year comparison.

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.

Top Solution Authors