cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Beowulf_Agat
Frequent Visitor

Sorting GroupBy, Descending

Hi,

I'm trying to combine two flexible height galleries to create an accordion-like gallery. I've managed to create it and it works pretty much the way I want it to. But I want the latest post to show at the top of the page, right now new posts go straight to the bottom of the page.

 

Here is my code for Gallery1.Item:
GroupBy(Filter(Beställningar;!IsBlank(EnhetLYK)= true);"Created";"ID";"EnhetLYK";"AvdelningLYK";"groupDetails")

 

And the code for Gallery2.Item:

ThisItem.groupDetails

 

Is it possible to combine GroupBy and SortOrder? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Beowulf_Agat 

You can order the results set using the SORT function.

 

Sort(
    GroupBy(
        Filter(Beställningar;!IsBlank(EnhetLYK)=true);
        "Created";
        "ID";
        "EnhetLYK";
        "AvdelningLYK";
        "groupDetails"
    ),
    Created,
    Descending
)

 

---
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."

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@Beowulf_Agat 

You can order the results set using the SORT function.

 

Sort(
    GroupBy(
        Filter(Beställningar;!IsBlank(EnhetLYK)=true);
        "Created";
        "ID";
        "EnhetLYK";
        "AvdelningLYK";
        "groupDetails"
    ),
    Created,
    Descending
)

 

---
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."

View solution in original post

Thanks @mdevaney it worked perfectly 🙂

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,519)