Formatting a Cross Table with corresponding column formatting when using a custom expression that uses multiple columns.

Formatting a Cross Table with corresponding column formatting when using a custom expression that uses multiple columns.

book

Article ID: KB0081382

calendar_today

Updated On:

Products Versions
Spotfire Analyst All versions

Description

Suppose there are two columns A and B with different formatting: for example, A has Currency formatting, B has Number formatting, and C is a column that has a different category.
 
If a custom expression such as
 
CASE when First([C])="X" 
then (Sum([A])) When First([C])="Y" 
then (Sum([B])) 
end 
 
is used in a Cross Table, then the formatting of the columns will be lost and the column will be displayed without any formatting. To achieve formatting, use an expression as shown in the Resolution below.

Issue/Introduction

Formatting a Cross Table with corresponding column formatting when using a custom expression that uses multiple columns.

Environment

All Supported Operating Systems

Resolution

Use the expression with Concatenate, because Concatenate brings the data with the actual formatting of the column:
 
CASE when First([C])="X" 
then Concatenate(Sum([A])) 
When First([C])="Y" 
then Concatenate(Sum([B])) 
end
 
Refer to the attached (Filename: FormattingCrossTable.dxp).
 

Additional Information

For syntax related information, refer to Spotfire help.

Attachments

Formatting a Cross Table with corresponding column formatting when using a custom expression that uses multiple columns. get_app