Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, I´m trying to make an analysis possible to different types of selections.
The requirement may be to analyse the incoming orders by OrdItemInsDtWeek (probably this will be my default analyse) or by a range of manual ly selected days (wich means the user will have to select a range of OrdItemInsDt' values)
I've tried to it in many ways but I didn't get there. My last try was with this expression:
=If(GetFieldSelections(OrdItemInsDt)>0, sum({<OrdItemInsDt={$(=GetFieldSelections(OrdItemInsDt))},OrdItemMillAlloc={*}-{'USA'}, OrdItemProdCd={*}-{'SHT'},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={'CONFIRM','COMPLETE','HOLD'}>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000, sum({<OrdItemInsDtWeek={$(=vLastInsDtWeek)},OrdItemMillAlloc={*}-{'USA'}, OrdItemProdCd={*}-{'SHT'},OrdMasterOrdType={'CUST','STOCK-WHSE'}, OrdItemOrdStat={'CONFIRM','COMPLETE','HOLD'}>}if(OrdItemDelDate<>OrdMasterOrdDate, OrdItemOrdKgs))/1000)
Do you have any idea what I might be doing wrong? Any help is welcome!
Thank you,
Sofia Vaz
The expression looks OK to me. First check the variable and the GetFieldSelections() function. Check the value of the variable and expression and and plug these values into the expression.
Should they have quotes?
OrdItemInsDt={"$(=GetFieldSelections(OrdItemInsDt))"},
OrdItemInsDtWeek={"$(=vLastInsDtWeek)"},
The expression looks OK to me. First check the variable and the GetFieldSelections() function. Check the value of the variable and expression and and plug these values into the expression.
Should they have quotes?
OrdItemInsDt={"$(=GetFieldSelections(OrdItemInsDt))"},
OrdItemInsDtWeek={"$(=vLastInsDtWeek)"},
Failing that, I would remove all the set filters and start with the basic expression:
=If(GetFieldSelections(OrdItemInsDt) > 0,
Sum(If(OrdItemDelDate <> OrdMasterOrdDate, OrdItemOrdKgs))/1000,
Sum(If(OrdItemDelDate <> OrdMasterOrdDate, OrdItemOrdKgs))/1000
)
Check the result and validate against your data model. Then add the set expression filters one at a time (except for the OrdItemInsDt, OrdItemInsDtWeek. If the result goes to zero, then you have no results matching all those conditions.
Thank You Jonathan!
The expression is working better with your help. Now, the only issue is that i can't select more than one OrdItemInsDt... but I think is due to the data model!
I think if you remove the condition "OrdItemInsDt={$(=GetFieldSelections(OrdItemInsDt))}", from the first expression then it will probably work...
You're right! It's working! Thank you very much!