Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
The script is not responding despite of complete execution and the application is hanging what may be the reason
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
This expression is giving an error
Num(Sum({<Sold_Date={"<=$(=vPrevYrMonthTo) >=$(=vPrevYrMonthFrom )”}>}[inv value])/sum(Sales_INR_Unit),’#,##0.0')
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?
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
Did the issue got fixed after updating the expression ?
Num(Sum({<Sold_Date={"<=$(=vPrevYrMonthTo) >=$(=vPrevYrMonthFrom )”}, [Season Code] ={“$(=vSales_Summary_Previous_Season)”}>}[inv value])/ Sales_INR_Unit,’#,##0.0')
again its giving an error
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
(
SAPCode_Orders:
Mapping LOAD
@2 as SAP_Trans_code,
@3 as SAPCode_Order
FROM
(
Material_Orders:
Mapping Load
@2&'N'&@3 as Material_Trans_code,
trim(@7) as Material
FROM
(
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
(
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
Num(Sum({<Sold_Date={"<=$(=vPrevYrMonthTo) >=$(=vPrevYrMonthFrom )”}, [Season Code] ={“$(=vSales_Summary_Previous_Season)”}>}[inv value])/$(Sales_INR_Unit),’#,##0.0')