Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formatting expression for both % and Numbers

Hi,

I need to display both % values (to two decimal places) and whole numbers as a 'value' in my pivot.  My current expression checks what the calculation should be :

If(single_value='N',num((sum(val1)/sum(val2)*100),'#,##0%'), sum(val3))

When I try this expression the percentage value is displayed incorrectly (5,232%, 479%)

I need to display percentages as 99.99% (to two decimal places) and full values which can run into 1000's (99,999 , 139942) also to two decimal places.

I have number format settings set to 'Expression Default' (see attached image).

Many thanks for  your help,

Fiorano

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try If(single_value='N',num((sum(val1)/sum(val2)),'#,###.00%'), num(sum(val3),'#,###.00'))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try If(single_value='N',num((sum(val1)/sum(val2)),'#,###.00%'), num(sum(val3),'#,###.00'))


talk is cheap, supply exceeds demand
Not applicable
Author

Excellent! Works perfectly!!!

Thank you very much for your time.!