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
robfitler
New Member

Compare point-in-time event counts

I want to create a matrix that shows counts for two point in time events and the difference between the two counts. First, I want viewers to select via slicers - college year (e.g., 2023-24), season and year (e.g., fall 2023), and event (e.g., beginning of term), and I want my matrix to show counts for that event AND counts for the same event (beginning of term), the same season (fall), BUT for the previous college year (2022-23) and year (2022). In my table I have the following variables - college_year, season_year, season, year, event, and term. Term is a four digit number that is comprised of the first two digits of the year, the last digit of the year, and a one-digit number for the term code (2=winter, 4=spring, 6=summer, and 8=fall). Fall 2023 would be 2238, fall 2022 would be 2228. How can I do this? 

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@robfitler I'm actually working on something very similar for an upcoming video. Would need sample data to be specific but I attached a sample PBIX file that might help with this. 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks, @Greg_Deckler! I have a small sample (500 rows) of data, but it appears that the file type (tried .xlsx, .cvs, and .txt) is not support here. Can I email it to you? I want the following primary slicers on my dashboard - college_year, season_year, and event. I also want these secondary slicers - student_type and college_major. I want a matrix that shows count for current (or selected primary slicer values), previous years event, and the difference. I want to show the counts by student_level. 

@robfitler My file invents the data. You just need to use DAX logic involved. Feel free to PM me here and I can provide my email address.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
lbendlin
Super User
Super User

You can use the "Penultimate" pattern with measures, or you can use the new Visual Calculation function PREVIOUS.  

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