Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In a table I have a dimension PDV_ModelCode which contains two completely different questions :
What I want is when PDV_ModelCode={"presenceOUT"} and PDV_Boolean={1} then Count or sum this formula PDV_ModelCode={"presenceKo"}, PDV_Enum={1}. I tried this script but it didn't work.
if(count({<PDV_ModelCode={"presenceOUT"}, PDV_Boolean={1}, StoreDisabled={0}>} StoreId&ProductId)>0,
count({<PDV_ModelName={"INTRO"}, PDV_Enum={1}, StoreDisabled={0}>} StoreId&ProductId))
try in set expression.
if([PDV_ModelCode]={'presenceOUT'} and [PDV_Boolean]='1' and [StoreDisabled]='0',
count({<[PDV_ModelName]={'INTRO'}, [PDV_Enum]={'1'}, [StoreDisabled]={'0'}>} [StoreId])
+
count({<[PDV_ModelName]={'INTRO'}, [PDV_Enum]={'1'}, [StoreDisabled]={'0'}>} [ProductId])
)
if you want to do in script, you can try something like below
Sample_Table:
load * from table;
join
load dimension1,
dimension2,dimension3,...
Count(Store_ID) as XXX,
Count(Product_ID) as YYYY
resident Sample_Table
where [PDV_ModelCode]={'presenceOUT'} and [PDV_Boolean]='1' and [StoreDisabled]='0';