Forums

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

Literal in Pivot function within Table Transformer Macro?

Jim Solomon May 19, 2023

I'm familiar with the ability to use the Literal operation in the Pivot Table macro in the Table Toolbox.

Is there any equivalent of that literal operation when using the PIVOT function within the SQL section of a Custom Table Transformer macro?  Or is it required to use a true (numerical) aggregating operator like MAX, or SUM, etc.?

1 answer

4 votes
Katerina Rudkovskaya _Stiltsoft_
Atlassian Partner
May 22, 2023

Hi @Jim Solomon,

The PIVOT function inside the Table Transformer macro doesn’t recognize the LITERAL option but you may use the GROUP BY function instead. Please see an example below:

Mon 5-1.png

SELECT 'Person',
FORMATWIKI(SUM('Activity' + "\n")) AS 'Activity',
FORMATWIKI(SUM('Value'::string + "\n")) AS 'Value'
FROM T1
GROUP BY 'Person'

Mon 5-2.png

Hope this workaround helps your case.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events