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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,374)