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
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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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