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.

Atlassian Community about banner
4,296,368
Community Members
 
Community Events
165
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".

Thank you for your time!

desired_output.png

Regards,

Emily

1 answer

1 accepted

Hi @Emily Berg ,

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

Wed 14-3.png

Wed 14-1.png

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

Wed 14-2.png

Hope this helps.

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

Emily

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

1,018 views 17 28
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you