web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Finding duplicates in ...
Power Apps
Answered

Finding duplicates in a gallery - Dataverse for Teams as datasource

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all, I've upataded the below question.

 

I'm trying to highlight items in a gallery that have duplicate values in certain fields (the app is built in teams with Dataverse for Teams as the datasource). Unfortunately, I am not getting the correct results

 

For example, I have the following formula to check if there are items with the same EffectiveFrom date (timezone independent date column):

 

CountIf(
 THR_0001_Contracts,
 EffectiveFrom = ThisItem.EffectiveFrom
)

 

 

As you can see from the screenshot below, the results are unreliable, as the bottom two both show 9/1/2020 12:00AM but the count in the last column is 0. 

hantsjoel_0-1629111816208.png

 

 

I have also tried Adding a column in the Items property of the gallery but this returns the same results.

 

Can anyone suggest what might be going wrong here?

 

Thanks

Joel

 

 

Categories:
  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    Could you try below code ? 

    Count(Filter(DataSoruce,Condition).ID)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @PriyankaGeethik, thanks for your suggestion but this hasn't worked for me. I've changed my example above as I've deduced that the problem seems to be related to date columns

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    The below code worked in my case. Let me know if it helps

     

    Count(Filter(THR_0001_Contracts,DateTimeValue(Text(EffectiveFrom ))=DateTimeValue(Text(ThisItem.EffectiveFrom ))).ID)

     

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Your formula does work, @PriyankaGeethik, but it doesn't delegate.

     

    I've been using CountIf() because it supposedly delegates in Dateverse for Teams with the Enhanced Delegation for Dataverse setting switched on....but it appears that it doesn't work for date columns. I think I may need to store the date in a single line of text helper column, with which I can check for the duplicates

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard