Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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.

jagan
Luminary Alumni
Luminary Alumni

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
Author

Kiran --

Sincere thanks!!!

Not applicable
Author

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