Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Significant 3 digits

Hi ,

I have a field containing values like

1.1

1.2

12.90

1..2.3.00

545.6

From this I need to filte rout only

1.1

1.2

Kindly help

Thanks!

2 Replies
MK_QSL
MVP
MVP

Load

NUM(SubField(Replace(Number,'..','.'),'.',1)&'.'&SubField(Replace(Number,'..','.'),'.',2),'#,##0.00') as Number Inline

[

  Number

  1.1

  1.2

  12.90

  1..2.3.00

  545.6

];

If you want single digit after decimal point, use '#,##0.0' instead of '#,##0.00'

tobias_klett
Partner - Creator II
Partner - Creator II

Hi,
It would be best to check the "." and be sure there is a number in Front and end and there are three digits. Therefore you could only take the values you need into the field:

if(mid(fieldXY,2,1)='.' and isnum(left(fieldXY,1)) and isnum(right(fieldXY,1)) and len(fieldXY)=3, fieldXY as filteredXY,

or filter the whole table:
where mid(fieldXY,2,1)='.' and isnum(left(fieldXY,1)) and isnum(right(fieldXY,1)) and len(fieldXY)=3;