Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Num# or another function

Hi guys,

I have a field wich tells us the % of click share. My problem is that when it is less than 10% it shows "<10%". In other cases it shows "x%" (for example, "70%")

What I want to do, is to loose the percentaje symbol and in case it hase one the "<".

Can you tell me a way to do this? i heard about the Num# function but i really don't understand it. If you guys could help me with this, or another function I appreciate it.

Thanks!

Nico

10 Replies
Digvijay_Singh
Honored Contributor III

Re: Num# or another function

Is it a numeric calculated field or directly read from source? can you share some sample values as well

Re: Num# or another function

May be this

Num#(KeepChar(FieldName, '0123456789')) as FieldName

roharoha
Valued Contributor III

Re: Num# or another function

try num#('###########.###%;<###########.###%')

--> this will set the numerical value, If you like you can set the formating with num, for example:

num(num#('###########.###%;<###########.###%'))

Not applicable

Re: Num# or another function

its read from the source. I get a field wich may content a percentaje number (like "70%", or "39,9%"), "<10%" or "--" in case it has no clicks

Not applicable

Re: Num# or another function

Robin thanks for the response!

what does all the ###### represent?

Could you explain me how the function works?

Nico

roharoha
Valued Contributor III

Re: Num# or another function

It's a number consisting of maximal 14 digits, the negative sign is "<" and everything is in percent...

Do you know the basics? , the difference between num#() and num()?

Not applicable

Re: Num# or another function

Great Sunny!! I used this and worked!!

Thanks a lot.

Nico

Re: Num# or another function

If you have decimal percentages, then I would modify this a little (added a decimal after 9 in the script below)

Num#(KeepChar(FieldName, '0123456789.')) as FieldName

Not applicable

Re: Num# or another function

Yes! I saw that, and did it!!

Thanks for your magic

Community Browser