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

Concatenate a number to a string

Hi all,

I have a Text object used to display the result of the following equaction:

= if(round(sum(Value)/sum({$<Product_Name=, Account_Name=>} TOTAL Value)*100)>0,round(sum(Value)/sum({$<Product_Name=, Account_Name=>} TOTAL Value)*100),0)

As this calculation displays percentage, I'd like to append it with the percentage sign "%". How can I do it? The following formula didn't work thogh:

= if(round(sum(Value)/sum({$<Product_Name=, Account_Name=>} TOTAL Value)*100)>0,round(sum(Value)/sum({$<Product_Name=, Account_Name=>} TOTAL Value)*100),0) $ '%'

Any suggestion is appreciated.

1 Solution

Accepted Solutions
Not applicable
Author

Hi ahmedb,

Replace '$' with '&' without the quotation marks.

- Lester

View solution in original post

2 Replies
Not applicable
Author

Hi ahmedb,

Replace '$' with '&' without the quotation marks.

- Lester

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'd recommend formatting the number using function num:

num( ... , '#,##0.0%')

This way, not only you get the desired %-sign, but also the number will be limited to a required number of decimals and, if needed, show a thousand separator. Keep in mind that you don't need to multiply by 100 - it will be done automatically...

Ask me about Qlik Sense Expert Class!