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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Cmcmahan
Resident Rockstar
Resident Rockstar

Count of Only Most Recent Value

I'm guessing that I'm missing something obvious, but I have survey data and the relevant columns are set up like this:

 

UserSurvey_DateResponse
Alex20221201Yes

Barry

20221225Maybe
Carl20221226No
Alex20220601No
Barry20220625Maybe

 

I would like to get a graph that looks like this, counting the number of users who answered each category:

Cmcmahan_0-1680792546122.png

 

 

My issue is that if I use straight DISTINCTCOUNT, if a user changed their answer between surveys in a specified year, it will count them in both response groups.  I have a business requirement to use the most recent answer.

 

If I try to use TOPN on the survey date, it gets only the most recent survey date for all users, in the above case, only counting Carl's single answer.  What I want is to TOPN each user's answers.

 

I'm guessing there's some solution with SUMMARIZECOLUMNS that I'm not seeing, but any guidance would be appreciated.

1 ACCEPTED SOLUTION
1 REPLY 1

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors