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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple NUM formatting function.

Hello Experts,

Can anyone check and tell me whats wrong with this expression in the chart. I have the Number format selected to Fixed To for this table so that I can get rid of the decimal values, but unable to add the % symbol in the end of the number.

=if(Valuelist('£ Variance v Q0F','Index V Q0F %','Index v YAG %') = '£ Variance v Q0F',num(sum({$<FORECAST_TYPE = {'Q0F'}>}FCT_GROSS_REVENUE)-sum(WK_SALES_GROSS_REV))/1000 ,
if(Valuelist('£ Variance v Q0F','Index V Q0F %','Index v YAG %') = 'Index V Q0F %',num(sum(WK_SALES_GROSS_REV)/sum({$<FORECAST_TYPE = {'Q0F'}>}FCT_GROSS_REVENUE)*100,'#.##0%'),
if(Valuelist('£ Variance v Q0F','Index V Q0F %','Index v YAG %') = 'Index v YAG %',sum(WK_SALES_GROSS_REV))))

The syntax of the expression is fine and seems to have problem only when use the num format function. I tried this in a text object and there it shows the value with a % added to the number but doesnt work here in a pivot.

Thanks in advance

ANDY

2 Replies
johnw
Champion III
Champion III

Not sure what specific problem you're having, but don't multiply by 100 when displaying as a percent. In other words:

num(.5,'#,##0.00%')

Displays as:

50.00%

Not applicable
Author

Hello John,

Thanks for the quick reply but you understood the problem right. I need to multiply by 100 to calculate the number in percentage, but I have a problem showing the % sign after the number in the chart. so I tried num(myexpression), '#.##0%' as I dont want decimals and also I cannot change the chart Number format to 'Show in %' . As if I do that its adding the % sign to all the numbers on the chart.