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 / Countif and If True
Power Apps
Answered

Countif and If True

(1) ShareShare
ReportReport
Posted on by 643

I have a roll call app and i would like to have a label showing the number of employees on site who are fire marshalls.

jamescosten_0-1686565109365.png

CountIf('Fire Safety Employee Checklist',Onsite = true & Responsibility = " Fire Marshall")

 

It returns 0 but i have 3 Fire Marshalls Onsite and my FX only shows an amber warning : 

 

jamescosten_1-1686565189825.png

 

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    It seems like you're encountering an issue with your formula and the connector you're using. The error message suggests that the "CountIf" operation is not supported by the connector you're using in your roll call app. This might explain why your formula is not returning the expected result.

    To work around this issue, you can try using the "Filter" function instead of "CountIf" to achieve the desired result. Here's an example formula that should help you count the number of employees on site who are fire marshals:

    COUNT(FILTER('Fire Safety Employee Checklist', Onsite = true, Responsibility = "Fire Marshall"))

    This formula uses the "Filter" function to create a filtered view of the 'Fire Safety Employee Checklist' based on the conditions specified. It then uses the "Count" function to count the number of rows in the filtered view, which corresponds to the number of employees on site who are fire marshals.

    Give this formula a try and see if it returns the correct count for you.

  • jamescosten Profile Picture
    643 on at

    jamescosten_0-1686565969447.png

     

  • timl Profile Picture
    36,815 Super User 2026 Season 1 on at

    @jamescosten 

    Count works against a single column table. Therefore, CountRows will work better in this situation. Note also that function names are case sensitive.

    CountRows(
     Filter('Fire Safety Employee Checklist',Onsite = true & Responsibility = " Fire Marshall")
    )
  • SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @jamescosten ,

     

    I think you have used & instead of && , please correct your formula as below. You can also use And keywrod instead of using &&.

     

    CountIf(
     'Fire Safety Employee Checklist',
     Onsite = true && Responsibility = "Fire Marshall"
    )

     

    If this helps do give this a thumbs up.

     

    Thanks,

    Sanmesh

  • Verified answer
    Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Sorry for the mistake. Try this:

    Count(Filter('Fire Safety Employee Checklist', Onsite = true, Responsibility = "Fire Marshall"))

    or:

    CountRows(Filter('Fire Safety Employee Checklist', Onsite = true, Responsibility = "Fire Marshall"))
  • jamescosten Profile Picture
    643 on at

    The Second one did the job thank you.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard