Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

New Calculated Field

I'm trying to create a new field in the script so I can add
this new field in sheets when needed.

ODBC CONNECT32 TO [MS Access
Database;DBQ=C:\daily\msn_bs.mdb]
;
SQL SELECT SO2010,

    CashAll2011

FROM `msn_BS`;

How would I create a new field called test that calculates in theory cash per share. So the new  field called test would take  the
field loaded CashAll2011 and divided it by SO2010 to create a value in the new field called test.

 

the new field test = CashAll2011/ SO2010

  

how can I do this?

Sorry I'm new and trying to avoid doing all the work in Excel.

Thanks

 

John


4 Replies
Not applicable

Re: New Calculated Field

ODBC CONNECT32 TO [MS Access
Database;DBQ=C:\daily\msn_bs.mdb]
;

Load  SO2010, CashAll2011, if(SO2010<>0,CashAll2011/SO2010,0) as test;
SQL SELECT SO2010,
    CashAll2011

FROM `msn_BS`;

Regards,

Kiran Rokkam.

MVP
MVP

Re: New Calculated Field

Hi,

Try like this

TableName:

LOAD

     SO2010,
     CashAll2011,

     If(SO2010 <> 0, CashAll2011/SO2010, 0) AS Test;

SQL SELECT

     SO2010,
     CashAll2011

FROM `msn_BS`;

Regards,

Jagan.

Not applicable

Re: New Calculated Field

Kiran --

Sincere thanks!!!

Not applicable

Re: New Calculated Field

Jagan -- appreciate the time taken to respond!! Best John

Community Browser