Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Problem in Split one filed into two fileds with in Load Script

Hi Frnz,

I want some data in AMID_ID filed. so i have taken AMID from AMID_ID by using some condition. It is not working, something problem in load script. Please find the attached QVW.

1 Solution

Accepted Solutions
Not applicable

Re: Problem in Split one filed into two fileds with in Load Script

Hi to All,

Now i got.For this In IF condition i have to give third parameter. I dnt want that in front end ,so i have filter in front end this third paramter value..

My Expression:  if(wildmatch(AMID_ID,'zzz*')<>1,AMID_ID,'TTTT') as AMID

So i dnt want TTTT in front end, so i have written if condition in front end.

Thanks to all help me a lot.

13 Replies
antoniotiman
Honored Contributor III

Re: Problem in Split one filed into two fileds with in Load Script

Which is Your AMID when AMID_ID is equal to 'zzz1' or 'zzz2' and so on ?

krishna_2644
Valued Contributor III

Re: Problem in Split one filed into two fileds with in Load Script

modify your expression in script as

if(wildmatch(AMID_ID,'zzz*')<>1,AMID_ID)

output:

Capture1.PNG

hrlinder
Honored Contributor

Re: Problem in Split one filed into two fileds with in Load Script

in your textobject for AMID you Need to include only the values and not the nulls

using set Analysis will do it

if you use other Charttypes you Need to define "suppress null values" under presentation

=sum(aggr(sum({<AMID={'*'}>}Sale),AMID))

Not applicable

Re: Problem in Split one filed into two fileds with in Load Script

Hi Frnz, Thaks for your answers. Actually I would like to modify in script level only. When i filter 'ZZZ' acount ids, AMID field value contains Null values. So results came differently. Please find the attached QVW, you will get idea in this. In bar chart values are coming wrongly. So i have to change in script level to get exact results

sasiparupudi1
Honored Contributor III

Re: Problem in Split one filed into two fileds with in Load Script

may be

if(not WildMatch (AMID_ID,'zzz*'),AMID_ID,'z') as AMID

Not applicable

Re: Problem in Split one filed into two fileds with in Load Script

Hi Sasidhar,

I just tried it is not working. AMID field contains null values after filtered. How can we remove null in this?

sasiparupudi1
Honored Contributor III

Re: Problem in Split one filed into two fileds with in Load Script

if(not WildMatch (AMID_ID,'zzz*'),AMID_ID,'na'&Right(AMID_ID,1)) as AMID

Employee
Employee

Re: Problem in Split one filed into two fileds with in Load Script

I don't see what you mean. If you use Sasidhar's  example AMID will get a 'z' value for each value that matches WildMatch (AMID_ID,'zzz*'). You can of course change 'z' to anything you like.

In your original example if(not WildMatch (AMID_ID,'zzz*'),AMID_ID) as AMID you don't specify what the value should be if the condition is not met, which you do with the third parameter. The syntax is:

If(condition, return_if_true, return_if_false)

If you leave out third parameter, Null is always returned if false.

Not applicable

Re: Problem in Split one filed into two fileds with in Load Script

Hi,

Ok..I got your point. Actually I dnt want take ZZZ ids into AMID Field. So what is the way ?

I want AMID ids otherthan ZZZ..So in IF condition What i have to mention.?

Community Browser