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 / Count with multiple st...
Power Apps
Unanswered

Count with multiple statements

(0) ShareShare
ReportReport
Posted on by 2

Hello Community,

 

I have a function like this:

CountIf(IncidentsTable;'DateStarted'>=DateAdd(Today();-30;Days) && (Filter(colPlant.Value;Value = "35"))

 

I want to count how many records are in collection colPlant with value 35 (i've made a collection because this is a multichoice) with DateStarted in last 30 days.

 

There's my function for creating colPlant:

Clear(colPlant);;ForAll(colMultiPlant;Collect(colPlant;Filter(Choices(IncidentsTable.Plant);Value in Plant.Value).Value))

 

Can someone explain me why this isn't working?

Categories:
I have the same question (0)
  • JasonLane Profile Picture
    261 on at

    @marzie do you have an error returned that you can share? I can see 2 x ;; in the function is that where the error is prehaps?

  • marzie Profile Picture
    2 on at

    I'm using ;; and ; instead of ; and , (due to region settings)

     

    I don't have any error, there's just blank label.

     

    When I use these two functions separately, it works. The problem arises when they are combined:

    CountIf(IncidentsTable;'DateStarted'>=DateAdd(Today();-30;Days))

    CountRows(Filter(colPlant.Value;Value = "35"))

  • JasonLane Profile Picture
    261 on at

    Ok

    try this:

    CountIf(Filter(IncidentsTable;'DateStarted'>=DateAdd(Today(),-30,Days)),Value(colPlant.Value;Value = "35"))

    If the value is a number and not text then change "35" to 35.

     

    Hope this works for you. 

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi @marzie, sorry you had to wait four months for a response - I've seen that there was no response from @JasonLane so I will try to help 🙂

     

    Could you let me know how your colPlant and IncidentsTable are related? Is there a field in colPlant that has the date started or else that references the IncidentsTable?

     

    Thanks,

    Sancho

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard