cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Danny_L
Helper III
Helper III

Sum and Filter function not working properly

Hello,

 

I have an Edit form connected to an SQL Data Source. I have three fields that are in number format in SQL:

 

WorkOrderNumber

QtyCompleted

TotalQty

 

In the QtyCompleted card, I want the value to be the sum of the TotalQty column for the particular work order number. Here is my formula:

 

On the Default of the Card

Sum(Filter('[dbo].[Mechanical]', WorkOrderNumber = DataCardValue3.Text),TotalQty)

 

I get an error stating that it is an incompatible type and that the values being compared aren't the same. The left value is a number and the right value is a text type.

 

Anyone have an idea of how I can fix this? 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Danny_L ,

Maybe something like

Sum(
   Filter(
      '[dbo].[Mechanical]', 
      WorkOrderNumber = Value(DataCardValue3.Text)
   ),
   TotalQty
)

 

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.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @Danny_L ,

Maybe something like

Sum(
   Filter(
      '[dbo].[Mechanical]', 
      WorkOrderNumber = Value(DataCardValue3.Text)
   ),
   TotalQty
)

 

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.

View solution in original post

Danny_L
Helper III
Helper III

Thanks @WarrenBelz that did it!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,469)