Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Table Transformer - Add column B and C based on value in Column A for each matching row

nppani
April 21, 2022

I am trying to Add two column values Column B and Column C based on value in Column A. How can I do that in the Table Transformer SQL

Example TABLE DATA

Col A     Col B    Col C

USA       10          20

CHINA    05         04

USA        30          20

USA          5           10

 

Select T1.'COL A', 

IF (T1.'COL A' = "USA",1,0) THEN SUM(T1.'COL B', T1.'COL C') AS 'USA TOTAL',

IF (T1.'COL A' = "CHINA",1,0) THEN SUM(T1.'COL B', T1.'COL C') AS 'CHINA TOTAL',

FROM T* GROUP BY T1.'COL A'

I might be wrong. Thanks for your time and help in advance.

2 answers

0 votes
George McVay
December 11, 2012

This is the Query:

<label class="fieldLabel" for="fieldJqlQuery">JQL Query:</label> category in ("AIT - APAC") and status in (Open,Reopened,"In Progress") order by priority desc, key desc
When run in JIRA, links appear.
When run inline from Confluence, no links appear.
George McVay
December 17, 2012

Any additional information needed?

0 votes
Luzia Mendes
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 Champions.
December 11, 2012

what is the exact filter you're using in Confluence?

I assume you're using the Jira issue macro in a Confluence page, right?

The detailed steps would like here...versions are also important

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events