cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
travishankins
Level: Power Up

Dropdown with distinct fields and "all"

Morning, 

 

I have a data card that has a dropdown menu for quarters that are pulled from a SharePoint list.  Once selected I have labels that pull the sum of other columns for the selected value of the dropdown for each column in my SharePoint list.  

 

Example:  User selects "1" and the Email Sent label is updated with the total count of emails sent for Quarter 1 from the SharePoint list

 

In my dropdown.item field I have the following:

 

["1", "2", "3","4", "All Quarters"]

Below my drop down field I have the labels with the text that shows: 

 

Sum(Filter(DataSource,QuarterEvent = Dropdown1.Selected.Value),Emails_Sent)

This works great when a user selects the values 1-4, but I can't figure out how to have the labels show the sum of all quarters when selecting "All Quarters" 

 

Any insight would be helpful - I am a bit new to PowerApps so this may be a noob question.  Thank you for hte help! 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Dropdown with distinct fields and "all"

You can combine multiple conditions with the "Or" operator, and use an expression like the one below to accomplish what you need:

Sum(
    Filter(
        DataSource,
        Dropdown1.Selected.Value = "All Quarters" Or QuarterEvent = Dropdown1.Selected.Value),
    Emails_Sent)
2 REPLIES 2
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Dropdown with distinct fields and "all"

You can combine multiple conditions with the "Or" operator, and use an expression like the one below to accomplish what you need:

Sum(
    Filter(
        DataSource,
        Dropdown1.Selected.Value = "All Quarters" Or QuarterEvent = Dropdown1.Selected.Value),
    Emails_Sent)
travishankins
Level: Power Up

Re: Dropdown with distinct fields and "all"

Thank you Carlos - that worked perfect!  Appreciate the help and solution provided Smiley Very Happy

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 143 members 3,745 guests
Please welcome our newest community members: