Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

Count the decimal precision

Hi everyone,

I would like to count the decimal precision for the following inline load :

Table A

1.22

2.666

24.3335

889.6

99

The decimal precision count should be as follows (output)

1.22 = 2

2.666 = 3

24.3335 = 4

889.6 = 1

99 = 0

Is this possible in qlikview ? The idea is to capture the highest precision possible in a given table.

Regards,

H

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

Len(Subfield(N,'.',2))

Where N is the name of the field in question.

View solution in original post

3 Replies
Anonymous
Not applicable

Use this in your script:

Len(Trim(SubField(FieldName, '.', 2))) as Precision

Anonymous
Not applicable

Like this ?

     len ( right ( 24.3335 ,   ( index ( 24.3335  , '.' ) + 1 ) ) )

petter
Partner - Champion III
Partner - Champion III

Len(Subfield(N,'.',2))

Where N is the name of the field in question.