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.

Danny_L
Helper III
Helper III

Thanks @WarrenBelz that did it!

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (6,048)