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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Super User
Super User

@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!:
The Definitive Guide to Power Query (M)

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!:
The Definitive Guide to Power Query (M)

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.