Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
mjt_childrens
Contributor III
Contributor III

Conditional Formatting in Expression

Hi All....

I have a scorecard straight table where MetricId is my dimension. I want to format an expression as integer, percent or currency depending on the metricid. Here is a simplified test case I've been working with:

= if(MetricId=2, num(count(CRMRecType),'###,###,##0'),

If(MetricId=5,num(count(CRMRecType)/100,'#,##0.00%'),

If(MetricId=22,num(sum(OpportunityAmount),'$##,###,###'))))

Number format for this expression is set to "Expression Default".

My calculations are working correctly but the formatting is being ignored. Any one of these format statements by itself works correctly but when I put them together the formatting is ignored. What am I missing?

Thanks for any insight into this issue....

Martha

10 Replies
Anonymous
Not applicable

please try this on i think it solved problem of conditional number formatting

num((if(vSelectionButton=1,Sum(expression1)

            ,if(vSelectionButton=2,Sum(expression1)

                 ))),if(vSelectionButton=1,'$ #,##','#,##0.00'))

Reagrds,

Dixit Panchal