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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
peschu123
Partner - Creator III
Partner - Creator III

Format a number with num() to use ' as separator in textbox

Hi,

I use a Textbox to show a value.

The Value is something like "10123456" and I want it formatted like this: "T€ 10'123"

I played around with num() but the main problem is the ' (apostrophe) ...

I hope somebody can help me out.

Best Regards,

Peter

16 Replies
rbecher
MVP
MVP

= num(round(sum({<[field1]={0}>} Costs) / 1000)), 'T€ #''##0', '.', chr(39))

Astrato.io Head of R&D
peschu123
Partner - Creator III
Partner - Creator III
Author

Works like a charm

Thank you Ralf and all other answers

If I get it right the sign between ### has to be the same like the thousand separator at the end?

I tried '#.##0',',',chr(39) and it seemed to simply ignore the chr(39) ...

Best Regards,

Peter

MK_QSL
MVP
MVP

Dear Ralf,

Can you explain how it works?

it's works like a charm!!!

Anonymous
Not applicable

just check below script use chr(146)

LOAD '"' &'T$'&' '& left(value,2)&' '&chr(146)&mid(value,3,3)  &'"'  as magic

FROM

C:\Users\Anant\Desktop\test.xlsx

(ooxml, embedded labels, table is Sheet7);

anant

rbecher
MVP
MVP

The second parameter is the format-code which is used:


num(expression [ , format-code [ , decimal-sep [ , thousands-sep ] ] ] )


3rd and 4th parameter are the separators in the given number

Astrato.io Head of R&D
rbecher
MVP
MVP

..see above

Astrato.io Head of R&D
peschu123
Partner - Creator III
Partner - Creator III
Author

Hi Anant,

I couldn't try this yet, but I think this will result in a string instead a numeric value.

Which is not wanted in my case...