# Need a formula to sum units sold based on date, sku, and customer and possibly other conditions. Is this possible?

• 0
• Question
• Updated 4 years ago

I use the formula Sumproduct and sumifs in excel but unable to identify if this is available in Qbase?

• 0 Points

Posted 4 years ago

• 0

Xavier Fan, Champion

• 800 Points
If each "sale" is in a separate record (say in the "Orders" table), then you can create summary fields in the parent table - to sum up amounts (e.g. the [Units Sold] number field in the "Orders" table) with various conditions (comparisons on date, sku, customer, etc.)

If you're looking to add up different number fields on the same record, there's an "If" statement in Formula - so yes, you can create sums based on various conditions - by creating Formula fields.

For example:

If (

[SKU] = "12345" and [Customer] = "ABC Corp.", [Unit A] + [Unit B],

[SKU] = "67890" and [Customer] = "DEF Corp.", [Unit C] + [Unit D],

[Unit A] + [Unit B] + [Unit C] + [Unit D]

)

You can combine both of these (summary and formula fields) in various ways, depending on what you need.