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
kkarlste
Creator
Creator
Author

And now.
What is next step?
SQL1.JPG

fvelascog72
Partner - Specialist
Partner - Specialist

Hi,

In your Database table you don´t have "TURNOVER Sales of the period" field, so this if doesn´t work.

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

// "TURNOVER Sales of the period" *

    "TXTMD Medium description"  as ToimintoSelite,

Saludos.

kkarlste
Creator
Creator
Author

Hi

Is not in this table, but there is another table.

Have you any ideas?Picture.JPG

fvelascog72
Partner - Specialist
Partner - Specialist

The SQL statement doesn´t read this field, so you have to do the IF where the two fields ("FKBER Functional Area" and "TURNOVER Sales of the period") were realtioned.

ahaahaaha
Partner - Master
Partner - Master

In the picture there is a "tb_src_SAP_Actuals' table with a field of [TURNOVER Sales of the period]. In script code at the beginning of this post data load from SAP to "FunctionalArea" table. It is not yet clear how they are connected at all, so that they can be used together.