cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Km00
Helper III
Helper III

Filter, IsBlank and sort

Need help combing what i have with the Sort descending, ascending.

 

Filter(ThisItem.grAreaDetail,!IsBlank('Area_Function (Area_Function1)'))

 

This is filtering a gallery.

 

When i added it at the end, i got blank results so that wasn't what i wanted to achieve.  I just want to put the results in order.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Km00 ,

 

Please try this formula:

Sort(ForAll(Distinct(ThisItem.grAreaDetail.DepartmentID),LookUp(ThisItem.grAreaDetail,DepartmentID=Result)),DepartmentID,Ascending)

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

4 REPLIES 4
mdevaney
Super User
Super User

@Km00 
Try this code in the Items property of the gallery.  Replace table and column names with your own.

Sort(
    Filter(
        YourTableName,
        YourColumnName=Blank()'
    ),
    SortColumnName,
    Ascending
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Km00
Helper III
Helper III

i tried that and it makes it all blank now.

 

this is what i did:  Sort(
Filter(
ThisItem.grAreaDetail,'Area_Function (Area_Function1)'=Blank()),
DepartmentID,
Ascending
)

 

and screenshot shows the blank gallery

 

Km00_0-1612468023666.png

 

Km00
Helper III
Helper III

I did this and was able to get it to sort but now, it shows all the duplicates. Only want one instance of each number.

 

Sort(
Filter(
ThisItem.grAreaDetail,!IsBlank('Area_Function (Area_Function1)')),
DepartmentID,
Ascending
)

 

Km00_0-1612468943076.png

 

v-xiaochen-msft
Community Support
Community Support

Hi @Km00 ,

 

Please try this formula:

Sort(ForAll(Distinct(ThisItem.grAreaDetail.DepartmentID),LookUp(ThisItem.grAreaDetail,DepartmentID=Result)),DepartmentID,Ascending)

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,783)