cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Sort multiple Cascade DropDowns

 

Sort(Distinct(Filter(Source1, 'Employee' = Employee.Selected.Result And Division = Division.Selected.Result And 'Office' = Office.Selected.Result),'Cost'), Ascending)

 

Above is what i am using and the returned data is correct. But i cannot get the data to sort properly either Ascending or descending order. I have tried to use Sort either before or after Distinct( but it does not make a difference.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Sort multiple Cascade DropDowns

Hi @fcnchuck ,

The right syntax of Sort should be like:

Sort( Table, Formula [, SortOrder ] )

While in your formula, you are lack of the second parameter.

Please try this formula:

Sort(Distinct(Filter(Source1, 'Employee' = Employee.Selected.Result And Division = Division.Selected.Result And 'Office' = Office.Selected.Result),'Cost'), Result,Ascending)

Here's a doc about this function for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort

 

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

Re: Sort multiple Cascade DropDowns

Are you getting an error? I see a few missing parenthesis. Unless I missed something I didnt see where you have specified the column to use for sorting.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
Highlighted
Regular Visitor

Re: Sort multiple Cascade DropDowns

No error. All data is returned, just not sorted alphabetically.

 

Maybe that is what i am missing. This drop down has values that are determined by the 2 preceding drop down selections. So the data that is shown should be sorted against itself i suppose?

Highlighted
Super User II
Super User II

Re: Sort multiple Cascade DropDowns

I will have yo check this on my computer but Sort requires an expression to sort by and SortBy requires a column name to sort by.

I will get back to you in a few minutes.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
Highlighted
Community Support
Community Support

Re: Sort multiple Cascade DropDowns

Hi @fcnchuck ,

The right syntax of Sort should be like:

Sort( Table, Formula [, SortOrder ] )

While in your formula, you are lack of the second parameter.

Please try this formula:

Sort(Distinct(Filter(Source1, 'Employee' = Employee.Selected.Result And Division = Division.Selected.Result And 'Office' = Office.Selected.Result),'Cost'), Result,Ascending)

Here's a doc about this function for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort

 

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Regular Visitor

Re: Sort multiple Cascade DropDowns

Thank you so much. I figured it was one parameter i was missing. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,999)