Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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.

View solution in original post

13 Replies
antoniotiman
Master III
Master III

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

Qrishna
Specialist III
Specialist III

modify your expression in script as

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

output:

Capture1.PNG

Anonymous
Not applicable
Author

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
Author

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
Master III
Master III

may be

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

Not applicable
Author

Hi Sasidhar,

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

sasiparupudi1
Master III
Master III

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

Ralf-Narfeldt
Employee
Employee

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
Author

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.?