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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
heidibb
Helper IV
Helper IV

How to get Last Year values

Hello,

I have academic data that we report in trimesters. I have a trimester sequence number and am successful in getting  last year's sequence number, but when I create my calculation to try and find last year's qty's, my value is showing blank. Not sure what I'm missing here.

 

StudentCount - TYCALCULATE(DISTINCTCOUNT('Cohort Metrics'[Student_SK]))

StudentCount - LYCALCULATE(DISTINCTCOUNT('Cohort Metrics'[Student_SK]), 'Cohort Metrics'[AcademicTrimesterSequenceNumber] = 'Cohort Metrics'[LY Trimester Sequence])
LY Trimester Sequence = 'Cohort Metrics'[AcademicTrimesterSequenceNumber] - 3
 
Output is in the picture:
 heidibb_0-1713904792241.png
1 REPLY 1
amitchandak
Super User
Super User

@heidibb , Are you using a date or Trimester  table with Year, Trimester Sequence (a table that join back to you table on Trimester key)

 

You can meausres like

 

This Period = CALCULATE(DISTINCTCOUNT( Registration[ID] ), FILTER(ALL(Semesters), Semesters[year]=max(Semesters[year])  && Semesters[Semesters]=max(Semesters[Semesters]) ))
Last Period = CALCULATE(DISTINCTCOUNT( Registration[ID] ), FILTER(ALL(Semesters),Semesters[year]=max(Semesters[year]) -1   && Semesters[Semesters]=max(Semesters[Semesters]) ))

 

 

here Semesters are numbers within year like 1,2,3 and reset every year

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.