
Announcements
Hello Power Platform Comunity,
I am experiencing a performance issue in Power Apps when working with large datasets. Specifically, I am using the "in" function to filter records from a large data source. _CGAPPS_MP2_Elementi_DN is a sql view that has 300.000 elements other databases are always less than 2000elements.
Here is the current formula I am using:
Problem is in "UsedMaterials":
ClearCollect(temp1,Filter('Mala potreba',VkljucenovMP=true));//all elements included in MP
ClearCollect(DynamicRecord, Distinct(temp1,'Naziv projekta'.Value));//active projects
Clear(Test1);
ForAll('Mala potreba',
Collect(Test1, {
Ident: Ident,
IdentNaziv: Naziv,
IdentKrom: LookUp(_vBI_2MB_Profili,acIdent12=Ident).acIdent5150,
Ident9001: LookUp(_vBI_2MB_Profili,acIdent12=Ident).acIdent5120,
Ident9002: LookUp(_vBI_2MB_Profili,acIdent12=Ident).acIdent5130,
Ident9010: LookUp(_vBI_2MB_Profili,acIdent12=Ident).acIdent5110,
Ident1015: LookUp(_vBI_2MB_Profili,acIdent12=Ident).acIdent5140,
UM: EM,
UsedMaterial: Sum(Filter(_CGAPPS_MP2_Elementi_DN, acCostDrv in ["24/226", "24/227", "24/228"] && Ident=acIdentItem), anCalcQty)
}));UsedMaterial: Sum(Filter(_CGAPPS_MP2_Elementi_DN, acCostDrv in DynamicRecord && Ident=acIdentItem), anCalcQty)
DynamicRecord can have from 1-50 elements
How can I come around this. I want to filter like this but with DynamicRecord that I'm collecting one step before:
UsedMaterial:Sum(Filter(_CGAPPS_MP2_Elementi_DN(acCostDrv=Value1||acCostDrv=Value2||acCostDrv=Value3...)&& Ident=acIdentItem), anCalcQty)
Thank you