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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Cant Add Two Filtered Values

(0) ShareShare
ReportReport
Posted on by

Good morning all!

 

I'm trying to have a formula calculate two selected values from a PowerApp that populates a SharePoint list: Primary Date and Alternate Date.

Applications_0-1663856304157.png

Here is my current formula:

"Number of Participants Currently Enrolled For Your Selected Date: " & 
With({_items: Filter('North Campus Walking Tour Signup Tracker', 'Primary Date'.Value = DataCardValue4.Selected.Value)},
CountRows(_items))

It works well for the Primary Date, but for the alternate date, I can't get it to calculate correctly:

Number of Participants Currently Enrolled For Your Selected Date: " & 
With({_items: Filter('North Campus Walking Tour Signup Tracker', 'Alternate Date'.Value = DataCardValue4.Selected.Value)},
CountRows(_items)) 

 

I get the following error:

Applications_1-1663856524843.png

 

Lastly, I'm building an "admin view" for people that sign up, but since I can't get the Alternate Date to calculate correctly, the formula doesn't show the correct number:

Sum(
With({_items: Filter('North Campus Walking Tour Signup Tracker', 'Primary Date'.Value = "1 September")},
CountRows(_items))
&&
With({_items: Filter('North Campus Walking Tour Signup Tracker', 'Alternate Date'.Value = "1 September")},
CountRows(_items))
)

 The error for this formula is:

Applications_2-1663856641515.png

 

 

Any thoughts on how to correct the formulas? Thank you!

I have the same question (0)
  • RandyHayes Profile Picture
    76,291 Super User 2024 Season 1 on at
    Re: Cant Add Two Filtered Values

    @Applications 

    In your formula you are specifying a table to compare to...that will not work.

    If your 'Alternate Date' column is a date column, then your formula should be:

    Number of Participants Currently Enrolled For Your Selected Date: " & 
     With({_items: Filter('North Campus Walking Tour Signup Tracker', 'Alternate Date' = 
     DataCardValue4.Selected.Value)}, 
     CountRows(_items)
     ) 

    However, the above is true if that column is a date column.  I have a feeling that perhaps it is a Choice column in your list...please clarify.

     

    If it is a choice column, then you most likely have that column defined to allow multiple values.  Please clarify as well.

  • Applications Profile Picture
    on at
    Re: Cant Add Two Filtered Values

    Correct, both the Primary and Alternate Date columns are choice columns, rather than Date columns.

  • RandyHayes Profile Picture
    76,291 Super User 2024 Season 1 on at
    Re: Cant Add Two Filtered Values

    @Applications 

    That is fine, but the more important part was the second thing for you to clarify - "then you most likely have that column defined to allow multiple values. Please clarify as well." 

     

     

  • Applications Profile Picture
    on at
    Re: Cant Add Two Filtered Values

    Ahh, apologies. The Alternate Date was a multiple selection column, yes - but I recreated it and it's now a single-selection column

  • Verified answer
    RandyHayes Profile Picture
    76,291 Super User 2024 Season 1 on at
    Re: Cant Add Two Filtered Values

    @Applications 

    If it is single select now, then your formula should work properly.

    Is it??

  • Applications Profile Picture
    on at
    Re: Cant Add Two Filtered Values

    It is, yes! I just cant mark as "Accept as Solution" because my work computer isn't letting me haha. But thank you so much! I'll mark it complete later 🙂

  • RandyHayes Profile Picture
    76,291 Super User 2024 Season 1 on at
    Re: Cant Add Two Filtered Values

    @Applications 

    No worries...just wanted to make sure you were good now.

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 652 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 410 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 236

Last 30 days Overall leaderboard