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

Independent filtering and sorting of a Gallery

Hi,

 

I want to filter and sort my gallery.

 

My filter options are: All, Having comment, Being Overdue,  Having follow up date. The chosen option is put into a variable FilterVar

Also I want to sort: Invoice date, Due date, Amount, Follow up date. The chosen option is put into a variable SortVar

 

From my mathematical understanding there are 16 combinations.

 

My idea was to first apply the filter statement to the item gallery and then as a chained command the sort statement

 

If(FilterVar=1; Sammlung2; If(FilterVar=2; Filter(Sammlung2; !IsBlank(Bemerkung)); If(FilterVar=3; Filter(Sammlung2; Delta>14))));; Sorting...

 

But this does not work.

 

I understand that I could use nested filtering and sorting. However, this would be a very big expression (16 combinations).

 

Any ideas, how to make this happen in a nice way?

 

Thx Christian

1 ACCEPTED SOLUTION

Accepted Solutions
KroonOfficeSol Resident Rockstar
Resident Rockstar

Re: Independent filtering and sorting of a Gallery

@chris4325 

 

Your approach is a bit off.

 

Try something like this:

SortByColumns(
    Filter(
        Sammlung2
        ,Or(
            FilterVar = 1
            ,And(FilterVar = 2, !IsBlank(Bemerkung))
            ,And(FilterVar=3, Delta>14)
        )

    )
    , SortVar
    , Ascending
)

 

Hope this helps you solve this.

 

Paul

View solution in original post

4 REPLIES 4
Community Support
Community Support

Re: Independent filtering and sorting of a Gallery

Hi,

 

The only way I can think of is the nesting solution way. I would give that a try and if it doesn't work for you I would consider opening a ticket with Microsoft Support. Unfortunately it is fairly uncommon that someone wants to filter as much as you. I will include a link below; on how to open a ticket with Microsoft Support. Otherwise if any other communities members might know feel free to chime in.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

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

KroonOfficeSol Resident Rockstar
Resident Rockstar

Re: Independent filtering and sorting of a Gallery

 

 

 

KroonOfficeSol Resident Rockstar
Resident Rockstar

Re: Independent filtering and sorting of a Gallery

@chris4325 

 

Your approach is a bit off.

 

Try something like this:

SortByColumns(
    Filter(
        Sammlung2
        ,Or(
            FilterVar = 1
            ,And(FilterVar = 2, !IsBlank(Bemerkung))
            ,And(FilterVar=3, Delta>14)
        )

    )
    , SortVar
    , Ascending
)

 

Hope this helps you solve this.

 

Paul

View solution in original post

chris4325
Frequent Visitor

Re: Independent filtering and sorting of a Gallery

 Hi Paul,

 

great, I did not know the SortByColumn function which allows for filtering and sorting independently. This is what I needed 🙂

 

Thx Chris

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,050)