Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

why my load script last line not work ?

Hi All


I have a field on sales stage the label very long , i like to shorten it :-


Replace([Opportunities Sales Stage],' ','_') as [Sales Stage], 


Closed_Lost

Closed_Won

Commitment_to_Buy

Initial_Communication

Needs_Assessment

Negotiation

Pending

Prospecting

Sales_Fulfillment


So i create a new script :-


     if([Opportunities Sales Stage]='Closed Lost', '8C_LOST',

if([Opportunities Sales Stage]='Closed Won', '9C_WON',

if([Opportunities Sales Stage]='Commitment to Buy', '5_COM2BUY',

if([Opportunities Sales Stage]='Initial Communication', '1INT_COM',

if([Opportunities Sales Stage]='Needs Assessment', '2NEED_AS',

if([Opportunities Sales Stage]='Negotiation', '4NEGO',

if([Opportunities Sales Stage]='Pending', '6PENDING',

if([Opportunities Sales Stage]='Prospecting', '3PROPOSE',

if([Opportunities Sales Stage]='Sales_Fulfillment', '7SALE_FULL',

))))))))) as [Sales Stage],

 

My above load script work fine for all label , except below linie :-


if([Opportunities Sales Stage]='Sales_Fulfillment', '7SALE_FULL',


it just display record the Sales_Fullfillment into 7SALES_FULL


Paul

4 Replies
paulyeo11
Valued Contributor II

Re: why my load script last line not work ?

Hi All

I found the error , after i remove the "_" from Sales_Fulfillment it work.

Thank

Paul

prma7799
Honored Contributor III

Re: why my load script last line not work ?

in [Opportunities Sales Stage]  field have any value like Sales_Fulfillment


paulyeo11
Valued Contributor II

Re: why my load script last line not work ?

Hi PM

now already solve.

Before is :-

Sales_Fulfillment

After i change to below , it work fine :-

Sales Fulfillment

Thank

Paul

prma7799
Honored Contributor III

Re: why my load script last line not work ?

okies


in that  _  is not there...



Community Browser