Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
bobbydave
Contributor III

purgechar, if not equal, not wildmatch? Which to use

Rate
BE-2014
0.11
AT-2016
UK-2016
1.11
1.21

I don't want to see BE-2014 or UK-2016 there are plenty more so I don't want to explicitly say if Rate <> AT....

Is there a way of say if(Rate <> ??-????, Rate)

I only want the Rate which would be something like 1.11 or 1 or 1.16

1 Solution

Accepted Solutions
MVP
MVP

Re: purgechar, if not equal, not wildmatch? Which to use

Hello bobbydave‌,

You can use the same applymap in the where clause like:

Load

          *

From <> where IsNum(ApplyMap('MapCountryToEuro', Country &'-'&[Snapshot Year]));

View solution in original post

12 Replies
MVP
MVP

Re: purgechar, if not equal, not wildmatch? Which to use

Set system variable ('.' as decimal sepeartor) in the  script like:

SET DecimalSep='.';

And then you can simply use IsNum() like:

Load

          Rate

From <> where IsNum(Rate);

Re: purgechar, if not equal, not wildmatch? Which to use

or

where len(KeepChar(CURRENT,'-'))=0;

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
bobbydave
Contributor III

Re: purgechar, if not equal, not wildmatch? Which to use

I am using an ApplyMap to get the values of Rate in my load script.

ApplyMap('MapCountryToEuro', Country & '-' &  [Snapshot Year]as Rate,

qlikview979
Valued Contributor

Re: purgechar, if not equal, not wildmatch? Which to use

Hi Try this

I am getting this like 0.11,1.11,1.21

T1:

load * Inline [

Rate

BE-2014

0.11

AT-2016

UK-2016

1.11

1.21

];

NoConcatenate

T2:

load

Rate

Resident T1 Where IsNum(Rate);

DROP table T1;

qlikview979
Valued Contributor

Re: purgechar, if not equal, not wildmatch? Which to use

Hi Bro, Please check

Your code is give output this  BE-2014,AT-2016,UK-2016

But he want  like this 0.11,1.11,1.21

Regards

bobbydave
Contributor III

Re: purgechar, if not equal, not wildmatch? Which to use

No, my output is

BE-2014
0.11
AT-2016
UK-2016
1.11
1.21

I don't want it to look like that. I want it only to show 0.11, 1.11, 1.21

I could also use an expression if I couldn't do it in the load script as I have the values ... I just need to filter them to remove the ??-???? values

marcus_malinow
Valued Contributor III

Re: purgechar, if not equal, not wildmatch? Which to use

Sounds like the following may help:

ApplyMap('MapCountryToEuro', Country & '-' &  [Snapshot Year], Null()as Rate,

MVP
MVP

Re: purgechar, if not equal, not wildmatch? Which to use

Hello bobbydave‌,

You can use the same applymap in the where clause like:

Load

          *

From <> where IsNum(ApplyMap('MapCountryToEuro', Country &'-'&[Snapshot Year]));

View solution in original post

Re: purgechar, if not equal, not wildmatch? Which to use

Bobby,

As you are expecting Mahesh gave, Right?

If still issue please post a sample qlikview application which demonstrates the problem

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)