web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery with multiple ...
Power Apps
Unanswered

Gallery with multiple filters

(0) ShareShare
ReportReport
Posted on by 99

Hi,

I need a help about the filters using a gallery.

When i used a filter with a option "In" (Red color), the filters work fine but when i add the others filter with ">" or using dates, the filter doens't work.

See below the image of the filters/screem and the code applied in the Item property of gallery:

EdevaldoJeronim_0-1615313006435.png

Sort(
       Filter(
               AddColumns(
                          TblMaterialMovimento;
                         "Saldo";
                         (Qtd_Estoque - Qtd_Expedida)
                );
                TxtPesquisa_ListaMaterial.Text in IdMaterial; 
                TxtPesquisa_ListaMaterial_IdOS.Text in IdOS;
                TxtPesquisa_ListaMaterial_Locacao.Text in IdLocacao;
                CbnListaMaterial_PlantaArmazem.Selected.IDPLANTA in IdPlanta_Armazem;
                Saldo > 0;
               Data_Ult_Locacao >= DatePicker_ListaMaterial_DtEstoqueInicial.SelectedDate And
               Data_Ult_Locacao <= DatePicker_ListaMaterial_DtEstoqueFinal.SelectedDate
       );
IdMaterial;
Ascending
);

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,123 Most Valuable Professional on at

    Hi @EdevaldoJeronim ,

    None of the filters other than Saldo >0 are Delegable, so I assume this may be  an and/or bracketing issue. 

    Sort(
     Filter(
     AddColumns(
     TblMaterialMovimento;
     "Saldo";
     (Qtd_Estoque - Qtd_Expedida)
     );
     (
     TxtPesquisa_ListaMaterial.Text in IdMaterial || 
     TxtPesquisa_ListaMaterial_IdOS.Text in IdOS ||
     TxtPesquisa_ListaMaterial_Locacao.Text in IdLocacao ||
     CbnListaMaterial_PlantaArmazem.Selected.IDPLANTA in IdPlanta_Armazem ||
     Saldo > 0 
     ) &&
     (
     Data_Ult_Locacao >= DatePicker_ListaMaterial_DtEstoqueInicial.SelectedDate &&
     Data_Ult_Locacao <= DatePicker_ListaMaterial_DtEstoqueFinal.SelectedDate
     )
     );
     IdMaterial;
     Ascending
    );

     I do not know what you are trying to achieve here (as a result). Also what is your data source?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • EdevaldoJeronim Profile Picture
    99 on at

    Hi @WarrenBelz ,

    the data source is Sharepoint.

    This is a simple search screen, the user will fill what they need to search.

    When the user fill or not the filters i'm using "In", no problems, the filters works fine but when I include in the code more filters like  "Saldo > 0" and the DataPicker for the user select the period using ">="  the filters not working anymore but if I use these filters with date isolated, the filters works.

     

    Now with your sugestion, when i do not fill anything (without fill any filters), not search any record

  • WarrenBelz Profile Picture
    156,123 Most Valuable Professional on at

    Hi @EdevaldoJeronim ,

    Try this

    With(
     {
     wMaterial:
     Filter(
     TblMaterialMovimento;
     TxtPesquisa_ListaMaterial.Text in IdMaterial;
     TxtPesquisa_ListaMaterial_IdOS.Text in IdOS;
     TxtPesquisa_ListaMaterial_Locacao.Text in IdLocacao;
     CbnListaMaterial_PlantaArmazem.Selected.IDPLANTA in IdPlanta_Armazem
     )
     ];
     Sort(
     Filter(
     AddColumns(
     wMaterial;
     "Saldo";
     Qtd_Estoque - Qtd_Expedida
     );
     Saldo > 0 &&
     Data_Ult_Locacao >= DatePicker_ListaMaterial_DtEstoqueInicial.SelectedDate &&
     Data_Ult_Locacao <= DatePicker_ListaMaterial_DtEstoqueFinal.SelectedDate
     )
     );
     IdMaterial;
     Ascending
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • EdevaldoJeronim Profile Picture
    99 on at

    @WarrenBelz ,

    Unfortunatelly also doesn't work.

    I tried with no filters selected and selected some filters and any situation no records was load in the gallery.

    EdevaldoJeronim_0-1615328627914.png

     

  • WarrenBelz Profile Picture
    156,123 Most Valuable Professional on at

    @EdevaldoJeronim ,

    Can you please "pull it apart" and check each filter on its own - this is a data matching rather than a coding issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard