Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
JulsS
Contributor
Contributor

Sum If Producing Unexpected Result

How come the below formulas don't have the same result?

I have stockitem_Supplier  filtered on "ExampleName".

Sum(line_amount_extax) = 2,908.18

Sum(If(stockitem_Supplier = 'ExampleName', line_amount_extax)) = 14,540.90

Why do they produce a different amount?

They are both summing the same thing, all the line_amount_extax for ExampleName.

Thanks for your help!

Labels (3)
3 Replies
tresesco
MVP
MVP

This is possible if you are having two fields coming from two different tables. In such cases, Sum(If... would produce cross-join equivalent association first and then sum the relevant rows.

JulsS
Contributor
Contributor
Author

Thanks tresesco,

What does "two fields coming from two different tables" mean?

Thanks!

Regards

tresesco
MVP
MVP

I meant, in your data model, the fieldstockitem_Supplier and line_amount_extax belong to different tables.