Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
kkarlste
Contributor II
Contributor II

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
Contributor II
Contributor II
Author

And now.
What is next step?
SQL1.JPG

fvelascog72
Partner
Partner

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
Contributor II
Contributor II
Author

Hi

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

Have you any ideas?Picture.JPG

fvelascog72
Partner
Partner

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
Master
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.