cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alessandramaced
Helper V
Helper V

Filter not showing all items in gallery

Hi I have a gallery with this formula:

 

ith(
{ControleDesp:ControleDespesasAdministrativas; EnderecosCont:ControleEnderecos};
Sort(
Filter(ControleDesp;
DESPESA = DespesaEscolhida;
Ano = Text(AnoEscolhido);
dpdFiltroEnd.Selected.Endereco = Blank() Or RefIDEnd = LookUp(EnderecosCont;Endereco = dpdFiltroEnd.Selected.Endereco).Idend
);
RefIDEnd;Ascending)
)

 

 

Today in tests I notice that filter is not showing all items (my sharepoint list has 3862 items and growing.

What I have to do to have no delegations problems and show all items?

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

@alessandramaced ,

I will try some bracketing from the syntax I know (yours is European, but this should work) and a bit of different logic

With(
   {
      EnderecosID:
      LookUp(
         EnderecosCont;
         Endereco = dpdFiltroEnd.Selected.Endereco
      ).Idend
   };
   Sort(
      Filter(
         ControleDespesasAdministrativas &&
         DESPESA = DespesaEscolhida &&
         Ano = Text(AnoEscolhido) &&
         (
            dpdFiltroEnd.Selected.Endereco = Blank() ||
            RefIDEnd = EnderecosID
         )
      );
      RefIDEnd
   )
)

 

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.

Visit my blog Practical Power Apps

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @alessandramaced ,

That is because With() is a "hidden" Delegation limit - it will only "collect" up to your Delegation limit of items after any Delegable Filter is applied to it. As you have not filtered either list, you will only get a maximum of 2,000 on each, however you need the statement on the ControleEnderecos List as relational lookups are not Delegable - the below should work as long as your ControleEnderecos list is under 2,000 items (and you have your limit set to this)

With(
   {EnderecosCont:ControleEnderecos};
   Sort(
      Filter(
         ControleDespesasAdministrativas;
         DESPESA = DespesaEscolhida;
         Ano = Text(AnoEscolhido);
         dpdFiltroEnd.Selected.Endereco = Blank() Or 
         RefIDEnd = LookUp(
            EnderecosCont;
            Endereco = dpdFiltroEnd.Selected.Endereco
         ).Idend
      );
      RefIDEnd;
      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.

Visit my blog Practical Power Apps

 

Still not working with records over 2000 in ControleDespesasAdministrativas

@alessandramaced ,

I will try some bracketing from the syntax I know (yours is European, but this should work) and a bit of different logic

With(
   {
      EnderecosID:
      LookUp(
         EnderecosCont;
         Endereco = dpdFiltroEnd.Selected.Endereco
      ).Idend
   };
   Sort(
      Filter(
         ControleDespesasAdministrativas &&
         DESPESA = DespesaEscolhida &&
         Ano = Text(AnoEscolhido) &&
         (
            dpdFiltroEnd.Selected.Endereco = Blank() ||
            RefIDEnd = EnderecosID
         )
      );
      RefIDEnd
   )
)

 

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.

Visit my blog Practical Power Apps

alessandramaced
Helper V
Helper V

My language is portuguese (brazil).

I try another way.

Did a collection for ControleDespesasAdministrativas with filter so never will have more than 2000 items form me.

And then did a simple filter for the filtered collection. Now is ok .

 

Thank you very much

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,400)