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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Issue using If and Count IF statements and getting an incompatible type comparison error

(2) ShareShare
ReportReport
Posted on by 8
I have a SharePoint list that is collating multiple rows of data for the same person - screenshot below:
 
 
I have then linked this to a PowerApp to help with summarising the multiple rows:
 
 
I have created a collection for my Sharepoint list but for the Label where I am trying to count the number of National Assessors for Title: 423476 I have this formula:
If(colSummary[@'Title']=ThisItem.'Title',CountIf(colSummary,colSummary[@'NationalORInternational']="National"))
 
With the below error:
The expression is intended to check if the title of the current item (`ThisItem.Title`) is equal to the title in the `colSummary` record (`colSummary.Title`). If they are equal, it aims to count the number of records in `colSummary` where the `NationalORInternational` field is equal to "National".

The error encountered is due to an incompatible type comparison. Specifically, the `Equals` function is being used incorrectly; it is trying to compare a record (`colSummary`) with a text value (`ThisItem.Title`). The `Equals` function expects both arguments to be of compatible types (e.g., both should be text), but in this case, one is a record and the other is a text string, leading to the type mismatch error.
 
Any suggestions for how to correct the incompatible type comparison error?
I have the same question (0)
  • Verified answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    Try below formula once. Let me know if it works.
     
    CountIf(
        colSummary,
        Title = ThisItem.Title && NationalORInternational = "National"
    )

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 80

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans