Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kkarlste
Creator
Creator

if Skript

Hi

I want multiplication -1 if toimintoalue >= 006.


This bold skript is a new.

If I comment this bold skript this works ok


//FUNCTIONALAREAS

FunctionalArea:

LOAD "FKBER Functional Area" as TOIMINTOALUE,

if("FKBER Functional Area" >= '006',"TURNOVER Sales of the period"  *-1),

// "TURNOVER Sales of the period" *

    "TXTMD Medium description"  as ToimintoSelite,

    "FKBER Functional Area"&'  '&"TXTMD Medium description" as FunctionalAreaSort, //13.10.

    if("FKBER Functional Area" > '009','Toimihenkilöt',if("FKBER Functional Area" = '006', 'Palkansaajat')) as FuncAreaGroup,

    if(FunctionalAreaLevel = 'CB0', 'SI CB', if(FunctionalAreaLevel = 'CB1', 'CU CB', if(FunctionalAreaLevel = 'CB2', 'DI CB', if(FunctionalAreaLevel = 'CB3', 'CO CB', FunctionalAreaLevel)))) as FunctionalAreaLevel,

    Turnover,

    CB0,

    CB1,

    CB2,

    CB3,

    AUC;

SQL SELECT *

FROM ISSQlikView.dbo."tb_src_SAP_MasterData_Functional_Area_2017";

ERROR MESSAGE

ERROR.JPG

14 Replies
prma7799
Master III
Master III

TURNOVER Sales of the period this field is missing in your  Database table tb_src_SAP_MasterData_Functional_Area_2017

ahaahaaha
Partner - Master
Partner - Master

Hi,

Try

if("FKBER Functional Area" >= '006',"Turnover Sales of the period"  *-1),

kkarlste
Creator
Creator
Author

and now I skipt this Turnover

if("FKBER Functional Area" >= '006',"Sales of the period"  *-1),

and this error

Field not found - <Sales of the period>

SQL SELECT *

FROM ISSQlikView.dbo."tb_src_SAP_MasterData_Functional_Area_2017"

prma7799
Master III
Master III

first Load full table into in qvd Like

Test:

SQL SELECT *

FROM ISSQlikView.dbo."tb_src_SAP_MasterData_Functional_Area_2017";

Store Test into  [FolderPath\Test.qvd(qvd)];


then check your filed name withe  Test table .

kkarlste
Creator
Creator
Author

SQL.JPG

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Kalle,

It may be filed name has changed in base data.

first load full table and check the name its vary from your previous one.

Thanks,

Arvind Patil

ahaahaaha
Partner - Master
Partner - Master

QlikView don't find field [Sales of the period] in your SQL base. You need to determine how the required field is named in the SQL base.

prma7799
Master III
Master III

remove SQL word from select statement and execute query 

fvelascog72
Partner - Specialist
Partner - Specialist

Hi,

Don´t write SQL at the beginning. Just SELECT.

Cheers.