cancel
Showing results for
Did you mean:
See all
See all
##### Top groups
Explore all groups

## Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user

Level 1: Seed

25 / 150 points

Next: Root

## Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

What goes around comes around! Share the love by gifting kudos to your peers.

## Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

## Come for the products,stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

4,558,787
Community Members

Community Events
184
Community Groups

# Filter Table or Table Transformer - Sumproduct Formula

Hello,

I have a large table with a "QTY" column and other columns identifying inclusion of the QTY (labeled as "A", "B", and "C" below).

I would like to create a "Total" row using the Sumproduct formula - add the QTY when the column contains an "X".

Regards,

Emily

#### 1 accepted

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2022

Hi @Emily Berg ,

We can suggest using the Table Transformer macro for your case:

SELECT
"Total" as 'QTY',
SUM(IF(T1.'A' = "X", T1.'QTY', 0)) AS 'A',
SUM(IF(T1.'B' = "X", T1.'QTY', 0)) AS 'B',
SUM(IF(T1.'C' = "X", T1.'QTY', 0)) AS 'C'
FROM T1
UNION CORRESPONDING
SELECT * FROM T1

Hope this helps.

@Katerina Kovriga _Stiltsoft_  - this is awesome, thank you!!

Emily