Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
simongoodman
Contributor

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)'))))

Tags (2)
1 Solution

Accepted Solutions
Highlighted
simongoodman
Contributor

Re: Conditional Formatting in Expression

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

View solution in original post

2 Replies
Highlighted

Re: Conditional Formatting in Expression

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)'))))

Highlighted
simongoodman
Contributor

Re: Conditional Formatting in Expression

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

View solution in original post