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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cbehanna
New Member

Filter Duplicate Values based on earlier submission

Hi all! Love this community! I'm new here and to PowerBI!

 

I am trying to do something that I haven't quite seen in other support posts. I have data that is coming in via a Microsoft Form. It is connected to PowerBI Desktop via its associated Excel spreadsheet stored in Sharepoint.

 

What I am trying to do is "filter" out duplicate responses so that only the most recent submission of theirs visualizes. Here's an example of my data:

 

Capture.PNG

 

For example, I would only like Tom and Melissa's most recent submissions (based on completion time) to visualize. This data is live and will continue to grow/change with duplicate submissions, so I'm hoping there is a solution via Power Query or DAX to only have the most recent submission, including if they submit any future responses.

 

Thanks for any assistance!

 

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try this measure:

Check = 
var a = IF(CALCULATE(COUNT('Table'[Name]),ALLEXCEPT('Table','Table'[Name]))>1,1,0)
return
IF(a=1,IF(MAX('Table'[Completion time])=CALCULATE(MAX('Table'[Completion time]),ALLEXCEPT('Table','Table'[Name])),0,1),0)

Then apply it to the original table visual and set Check=0, the result shows:

5.PNG

Here is my test pbix file:

pbix 

Hope this can help.

 

Best Regards,

Giotto Zhi

View solution in original post

2 REPLIES 2
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try this measure:

Check = 
var a = IF(CALCULATE(COUNT('Table'[Name]),ALLEXCEPT('Table','Table'[Name]))>1,1,0)
return
IF(a=1,IF(MAX('Table'[Completion time])=CALCULATE(MAX('Table'[Completion time]),ALLEXCEPT('Table','Table'[Name])),0,1),0)

Then apply it to the original table visual and set Check=0, the result shows:

5.PNG

Here is my test pbix file:

pbix 

Hope this can help.

 

Best Regards,

Giotto Zhi

amitchandak
Super User
Super User

I think you can try lastnonblankvalue, part of Feb 2020 release

https://docs.microsoft.com/en-us/dax/lastnonblankvalue-function-dax

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.