cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aminb19
Level: Powered On

Multiple actions in a formula to show distinct results

 

 

Hi, attempting to have results show for a dropdown and listbox controls based on the previous selection.

 

See powerapps screen -

powerapps2.PNG

 

I want  '2. Select Location' to only show results when a '1. Select Region' is selected, and subsequently, I want '3. Select Program' to show only based on the Location and Region as selected above.

 

The Data souce is an excel spreadsheet that's been imported, looks like this below -

 

table.PNG

 

Note that the results on the right are a list box (without borders) and aligned to look like a table. The idea behind that is once you select the activity from '5. Select Activity' the content on the right screen will also update (but I can do that once I know how to have multiple conditions in a formula)

1 ACCEPTED SOLUTION

Accepted Solutions
MelindaK
Level 8

Re: Multiple actions in a formula to show distinct results

Hi,

 

I think I have implemented something similar with your request.

In my case I had a scnerio of Branch, Area, Region - Area being filtered based on Region selected and Branch being filtered based on Area and Region selected.

 

So my first drop down "Region" has the following function: 

SortByColumns(Distinct(BranchAreaRegion, Region), "Result")

- which returns all the distinct values from the Region column from my list

 

The second one  "Area" has the following function:

 SortByColumns(Distinct(Filter(BranchAreaRegion, Region = [@ddRegion].Selected.Result).Area, Area), "Result") 

- which is based on the selection from the "Region" drop down

 

And the final one "Branch" has the following function: 

SortByColumns(Filter(BranchAreaRegion, Region = [@ddRegion].Selected.Result && Area = [@ddArea].Selected.Result), "Branch").BranchRef1

- which is based on both the previous selections

 

Hope this helps 🙂 

MelindaK

View solution in original post

5 REPLIES 5
MelindaK
Level 8

Re: Multiple actions in a formula to show distinct results

Hi,

 

I think I have implemented something similar with your request.

In my case I had a scnerio of Branch, Area, Region - Area being filtered based on Region selected and Branch being filtered based on Area and Region selected.

 

So my first drop down "Region" has the following function: 

SortByColumns(Distinct(BranchAreaRegion, Region), "Result")

- which returns all the distinct values from the Region column from my list

 

The second one  "Area" has the following function:

 SortByColumns(Distinct(Filter(BranchAreaRegion, Region = [@ddRegion].Selected.Result).Area, Area), "Result") 

- which is based on the selection from the "Region" drop down

 

And the final one "Branch" has the following function: 

SortByColumns(Filter(BranchAreaRegion, Region = [@ddRegion].Selected.Result && Area = [@ddArea].Selected.Result), "Branch").BranchRef1

- which is based on both the previous selections

 

Hope this helps 🙂 

MelindaK

View solution in original post

aminb19
Level: Powered On

Re: Multiple actions in a formula to show distinct results

Thank you, perfect!

tianaranjo
Level 8

Re: Multiple actions in a formula to show distinct results

Can you tell me where you enter the function?  Is it under Items?  

MelindaK
Level 8

Re: Multiple actions in a formula to show distinct results

@tianaranjo yes under Items of each drop down.

MelindaK
tianaranjo
Level 8

Re: Multiple actions in a formula to show distinct results

Thank your response.  

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (2,762)