Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
simongoodman
Creator
Creator

Conditional Formatting in Expression

I have a pivot table with one expression but I need that expression to handle multiple number formats, #,##0.0%, #,##0.00, #,##0. One text field uses #,##0.00%, 15 text fields use #,##0 and the rest #,##0.0 for which I was hoping to use the Number default to handle them.

I have tried to create an if statement but can not get it to fully work. All the formatting works but the Visual Cues <0 stops working, so I tried to add if to solve it. See below;

=If ([AR Field]) = 'Text%', text(num(sum([PointsData[),'#,##0.0%')),

if ([AR Field]= 'Textwholenumber', text(num(sum([PointsData]), '#,##0;(#,##0)')),

if ([PointsData<0, 'RGB(255,0,0)'))))

1 Solution

Accepted Solutions
simongoodman
Creator
Creator
Author

Working, removed if RGB section from expression and applied it Expression/Text Colour. But many thanks.

View solution in original post

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Dont use text in that case

=If ([AR Field]) = 'Text%', num(sum([PointsData[),'#,##0.0%'),

if ([AR Field]= 'Textwholenumber', num(sum([PointsData]), '#,##0;(#,##0)'),

if ([PointsData<0, 'RGB(255,0,0)'))))

simongoodman
Creator
Creator
Author

Working, removed if RGB section from expression and applied it Expression/Text Colour. But many thanks.