Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditionally format numbers

Hi members,

I need to format the value of expressions in a pivot table conditionally. I.e if the expression returns a value >100, I want to show 5 digits after decimal. Vice versa, it shows 6 digits.

I see that the Number formatting in Properties doesn't have option for this. Does anyone have any idea?

7 Replies
tush
Creator II
Creator II

Hi Vivian,

               Please try below expression:

=if (Sum(Profit)>100,num(Sum(Profit),'#0.00000'),num(Sum(Profit),'#0.000000'))


Note : Replace Profit with you actual field.

Thiago_Justen_

You could try format the expression output as follow:

If (YourExpression>100,

Round(YourExpression,0.00001),

Round(YourExpression,0.000001))

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Anonymous
Not applicable
Author

Hi Tushar,

I tried this but it doesn't work. I guess perhaps because of the format. However I cannot post the formula here due to confidentiality. Can I have your email?

Anonymous
Not applicable
Author

Hi Thiago, I applied your solution but it didn't work.

Thiago_Justen_

Could you please. post your expression?

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Anonymous
Not applicable
Author

Hi Thiago,

Cannot post it here due to confidentiality. If possible can I have your email?

Thiago_Justen_

Skype: justen.thiago

Email: thiago.justen@ultransportes.com.br

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago