Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

after running the script the script is executed completed but my application is not responding

Hi

The script is not responding despite of complete execution and the application is hanging what may be the reason

24 Replies
jyothish8807
Master II
Master II

Try like this:

Create two variable:

vPrevYrMonthTo = MakeDate(Prev_Year,month(To),day(To))

vPrevYrMonthFrom = MakeDate(Prev_Year,month(From),day(From))

Exp:

Num(Sum({<Sold_Date={‘<=$( vPrevYrMonthTo )’}, Sold_Date={‘>=$( vPrevYrMonthFrom )’}>[inv value])/sum(Sales_INR_Unit),’#,##0.0')


Disable other expression and see if the charts are responding, if it works modify other expressions also


Br,

KC

Best Regards,
KC
Anonymous
Not applicable
Author

This expression is giving an error

image5.png

jyothish8807
Master II
Master II

Num(Sum({<Sold_Date={"<=$(=vPrevYrMonthTo) >=$(=vPrevYrMonthFrom )”}>}[inv value])/sum(Sales_INR_Unit),’#,##0.0')

Best Regards,
KC
Anonymous
Not applicable
Author

2014 season

  =

num(

sum(

if(

Sold_Date <=

MakeDate(

Prev_Year,

month(

To),

day(

To))

and

Sold_Date >=

MakeDate(

Prev_Year,

month(

From),

day(

From))

and

[Season Code] =

$(vSales_Summary_Previous_Season)

[inv value]))/

Sales_INR_Unit,
'#,##0.0')

Hoe to convert this?

Anonymous
Not applicable
Author

total

=num(
(
sum(if(Sold_Date <= MakeDate(Curr_Year,month(To),day(To)) and Sold_Date >= MakeDate(Curr_Year,month(From),day(From)),  [inv value]))
-
sum(if(Sold_Date <= MakeDate(Prev_Year,month(To),day(To)) and Sold_Date >= MakeDate(Prev_Year,month(From),day(From)),  [inv value])))
/
sum(if(Sold_Date <= MakeDate(Prev_Year,month(To),day(To)) and Sold_Date >= MakeDate(Prev_Year,month(From),day(From)),  [inv value])),
'#,##0%')
total season

=num(
(
sum(if(Sold_Date <= MakeDate(Curr_Year,month(To),day(To)) and Sold_Date >= MakeDate(Curr_Year,month(From),day(From)) and [Season Code] = $(vSales_Summary_Current_Season)[inv value]))
-
sum(if(Sold_Date <= MakeDate(Prev_Year,month(To),day(To)) and Sold_Date >= MakeDate(Prev_Year,month(From),day(From)) and [Season Code] = $(vSales_Summary_Previous_Season)[inv value])))
/
sum(if(Sold_Date <= MakeDate(Prev_Year,month(To),day(To)) and Sold_Date >= MakeDate(Prev_Year,month(From),day(From)) and [Season Code] = $(vSales_Summary_Previous_Season)[inv value])),
'#,##0%')

 

For this expression also

jyothish8807
Master II
Master II

Did the issue got fixed after updating the expression ?

Best Regards,
KC
jyothish8807
Master II
Master II

Num(Sum({<Sold_Date={"<=$(=vPrevYrMonthTo) >=$(=vPrevYrMonthFrom )”}, [Season Code] ={“$(=vSales_Summary_Previous_Season)”}>}[inv value])/ Sales_INR_Unit,’#,##0.0')

Best Regards,
KC
Anonymous
Not applicable
Author

again its giving an error

Anonymous
Not applicable
Author

Order data

Orders:
LOAD
[0SOLD_TO:0SOLD_TO] as SAPCode_Order,
[0MATERIAL:0MATERIAL]&[0AF_COLOR:0AF_COLOR]&[0AF_SIZE:0AF_SIZE] as itemnumber,
left([0MATERIAL:0MATERIAL],3) as [Season Code],
[0CONF_QTY:0CONF_QTY] as quantity_order,
[Z_MRP_INR:Z_MRP_INR] as Sales_price_order,
(
[Z_WSP_INR:Z_WSP_INR]/[0CONF_QTY:0CONF_QTY]) as WS_price
FROM

(
txt, codepage is 1252, embedded labels, delimiter is '|', msq);


SAPCode_Orders:
Mapping LOAD
@2 as SAP_Trans_code,
@3 as SAPCode_Order
FROM

(
txt, codepage is 1252, no labels, delimiter is '|', msq);


Material_Orders:
Mapping Load
@2&'N'&@3 as Material_Trans_code,
trim(@7) as Material
FROM

(
txt, codepage is 1252, no labels, delimiter is '|', msq);


SAP_LEVEL:
LOAD @2 as SAP_Trans_code,
@2&'N'&@3 as Material_Trans_code
@7 as Color_Size,
@12 as quantity_order,
@15/@12 as WS_Price
FROM

(
txt, codepage is 1252, no labels, delimiter is '|', msq)
where @6='';


SAP_LEVEL_Final:
Concatenate(Orders)
Load
ApplyMap('SAPCode_Orders',SAP_Trans_code,'-') as SAPCode_Order,
ApplyMap('Material_Orders',Material_Trans_code,'-')&Color_Size as itemnumber,
Left(ApplyMap('Material_Orders',Material_Trans_code,'-'),3) as [Season Code],
applymap('MRP_temp',ApplyMap('Material_Orders',Material_Trans_code,'-')&Color_Size,'-')*quantity_order as Sales_price_order,
quantity_order,
WS_Price
Resident SAP_LEVEL;

drop table SAP_LEVEL;



Temporary:
mapping LOAD SAPCode as SAPCode_Order,
ETPCode
Resident Store_Mapping ;

Orders_temp:
load SAPCode_Order,
[Season Code],
itemnumber,
quantity_order,
Sales_price_order,
WS_price,
 
applymap('Temporary',SAPCode_Order,'Others') as ETPCode
resident Orders;

drop table Orders;

Orders_temp2:
left keep (Temp)
load
*
resident Orders_temp;

drop table Orders_temp;

Orders_data:
//Concatenate(POS_Master)
load
SAPCode_Order,
[Season Code],
itemnumber,
quantity_order,
Sales_price_order,
ETPCode
resident Orders_temp2;

Pos_Master_temp:
load *,
itemnumber&ETPCode as Key
resident Orders_data;

WS_Mapping:
mapping load itemnumber&ETPCode as Key,
WS_price
resident Orders_temp2;

POS_Master_final:
load *,
applymap('WS_Mapping',Key,'-') as WS_Cost
resident Pos_Master_temp;

//drop table POS_Master;
drop table Orders_data;
drop table Pos_Master_temp;

drop table Orders_temp2;

this  above script is executed before incremetal load

jyothish8807
Master II
Master II

Num(Sum({<Sold_Date={"<=$(=vPrevYrMonthTo) >=$(=vPrevYrMonthFrom )”}, [Season Code] ={“$(=vSales_Summary_Previous_Season)”}>}[inv value])/$(Sales_INR_Unit),’#,##0.0')

Best Regards,
KC