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.
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 :
The Second one did the job thank you.
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"))
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
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")
)
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.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional