cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kgordish
Resolver I
Resolver I

With function to avoid delegation with Sum

Just learning about the WITH function and how to avoid delegation issues with Sum. My filtered data is less than 2000.

 

Is there a way I can use WITH with my formula below?

 

Text(Sum(Filter(Gateways,'VPP Dates'>=DatePicker1.SelectedDate,'VPP Dates'<=DatePicker2.SelectedDate,Gateways.Value="FDJ",BPR.Value="Y"),NTEI)/Sum(Filter(Gateways,'VPP Dates'>=DatePicker1.SelectedDate,'VPP Dates'<=DatePicker2.SelectedDate,Gateways.Value="FDJ",BPR.Value="Y"),NTEI_Total)*100,"0%")

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @kgordish ,

This should be close - free-typed so watch commas/brackets etc

With(
   {
      wList:
      Filter(
         Gateways,
         'VPP Dates' >= DatePicker1.SelectedDate &&
         'VPP Dates' <= DatePicker2.SelectedDate &&
         Gateways.Value = "FDJ" &&
         BPR.Value = "Y"
      )
   },
   Text(
      Sum(
         wList,
         NTEI
      ) / 
      Sum(
         wList,
         NTEI_Total
      ) * 100,
      "0%"
   )
)

I have a blog on this subject that may interest you.

 

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

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @kgordish ,

This should be close - free-typed so watch commas/brackets etc

With(
   {
      wList:
      Filter(
         Gateways,
         'VPP Dates' >= DatePicker1.SelectedDate &&
         'VPP Dates' <= DatePicker2.SelectedDate &&
         Gateways.Value = "FDJ" &&
         BPR.Value = "Y"
      )
   },
   Text(
      Sum(
         wList,
         NTEI
      ) / 
      Sum(
         wList,
         NTEI_Total
      ) * 100,
      "0%"
   )
)

I have a blog on this subject that may interest you.

 

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

@WarrenBelz Thanks for the general format. Helpful. About to wrap up for the day. Tomorrow I will give a spin and likely extend "A solution". 
Thank you Professor. 

Kevin

kgordish
Resolver I
Resolver I

@WarrenBelz  Your free hand is exceptional. Thank you. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,862)