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 / Cant Add Two Filtered ...
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!

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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

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

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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

    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,299 Super User 2024 Season 1 on at

    @Applications 

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

    Is it??

  • Applications Profile Picture
    on at

    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,299 Super User 2024 Season 1 on at

    @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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard