Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Iam using the below expression . which has an error
I know that in set analysis we cannot use left side a variable , but is there any other wat to handle this ? because this is giving me an error . please find the screen shot
Count(
{$<
$(vBS_Sales_Map_Left) = $(vBS_Sales_Map_Right),
Hierarchy = P(Hierarchy_S),
Date = {">=$(StartDate)<=$(EndDate)"}
>} Dummy_Closed_Sale_Lead_UID_AllCat_Count_LSM
)
,
Count(
{$<
$(vBS_Dashboard_Sales_Left) = $(vBS_Dashboard_Sales_Right),
Hierarchy = P(Hierarchy_S),
Date = {">=$(StartDate)<=$(EndDate)"}
>} Dummy_Closed_Sale_Lead_UID_AllCat_Count_LSM
)
)
can some one please rectify this...
You could try like this
LOAD * inline
[
Current_Level,vBS_Sales_Map_Left,vBS_Dashboard_Sales_Left
5,S_O,S_O
3,District_S_O,District_S_O
2,District_S_O,Region_S_O
4,Region_S_O,S_O
1,Region_S_O,S_O
];
So automatically the fields will get linked in the model , so now you can replace the left hand side with the new field names created in the script i.e vBS_Sales_Map_Left,vBS_Dashboard_Sales_Left
try creating the vBS_Dashboard_Sales_Left values in the script as a calculated field or a inline table and then you could use the same in the front end
Hi Avinash , again the contenet with the variables is a variable which has conditions , which cannot be written in the script , Is there no other way to manipulate this expression ?
could you please share the expression you have written in the variables ??
Thanks Avinash ,
This is the expression under the variable " $(vBS_Sales_Map_Left) "
=
if
(
Current_Level = 5,
'S_O',
if
(
Current_Level = 3,
'District_S_O',
if
(
Current_Level = 2,
'District_S_O',
'Region_S_O'
)
)
)
And expression under " $(vBS_Dashboard_Sales_Left) "
=
if
(
Current_Level = 5,
'S_O',
if
(
Current_Level = 3,
'District_S_O',
if
(
Current_Level = 2,
'Region_S_O',
'S_O'
)
)
)
Both the variables have almost same expression
You could try like this
LOAD * inline
[
Current_Level,vBS_Sales_Map_Left,vBS_Dashboard_Sales_Left
5,S_O,S_O
3,District_S_O,District_S_O
2,District_S_O,Region_S_O
4,Region_S_O,S_O
1,Region_S_O,S_O
];
So automatically the fields will get linked in the model , so now you can replace the left hand side with the new field names created in the script i.e vBS_Sales_Map_Left,vBS_Dashboard_Sales_Left