Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I try to create the new chart with use set analysis with alternate States !!!
I have this Expression
Sum( {1<TRANS_TYPE={"VOUCHER"} ,POST_DATE= {"<=$(=Max(POST_DATE))"} >} (ITEM_QTY*VOU_n)*Cost_Item)
How I can add alternate States like Group1
Many Thanks
Abdulaziz
In your expression you seem to be ignoring all the selections using 1.... if that is true the only place where alternate state can play a role is in the selection on POST_DATE.... you can try this
Sum({1<TRANS_TYPE = {"VOUCHER"}, POST_DATE = {"<=$(=Max({[Group1]} POST_DATE))"}>} (ITEM_QTY*VOU_n)*Cost_Item)
If one was to avoid selections in inherited state and you want the selections to be driven from Group1 state... then try this
Sum({[Group1]<TRANS_TYPE = {"VOUCHER"}, POST_DATE = {"<=$(=Max({[Group1]} POST_DATE))"}>} (ITEM_QTY*VOU_n)*Cost_Item)
or this if POST_DATE selection is still driven by inherited state
Sum({[Group1]<TRANS_TYPE = {"VOUCHER"}, POST_DATE = {"<=$(=Max(POST_DATE))"}>} (ITEM_QTY*VOU_n)*Cost_Item)
Like this:
Sum( {1+ Group1<TRANS_TYPE={"VOUCHER"} ,POST_DATE= {"<=$(=Max(POST_DATE))"} >} (ITEM_QTY*VOU_n)*Cost_Item)
Regards,
Mayank
Yes, you can use Set Analysis together with Alternate States.
Example:
=sum({$ < CompanyName=Group2::CompanyName > } LineSalesAmount)
In the above example we use the selection in CompanyName in the Alternate State "Group2" and pretend it is selected for the default state.
Example 2:
= sum({Group2 < Year = $::Year > } LineSalesAmount)
In the above example we use the selection on Year in the default state as the selection for those in Group2.
Hello Mayank
I try this before, It gives me an error number
Is it possible to share sample qvw and error screenshot here.
Regards,
Mayank
In your expression you seem to be ignoring all the selections using 1.... if that is true the only place where alternate state can play a role is in the selection on POST_DATE.... you can try this
Sum({1<TRANS_TYPE = {"VOUCHER"}, POST_DATE = {"<=$(=Max({[Group1]} POST_DATE))"}>} (ITEM_QTY*VOU_n)*Cost_Item)
If one was to avoid selections in inherited state and you want the selections to be driven from Group1 state... then try this
Sum({[Group1]<TRANS_TYPE = {"VOUCHER"}, POST_DATE = {"<=$(=Max({[Group1]} POST_DATE))"}>} (ITEM_QTY*VOU_n)*Cost_Item)
or this if POST_DATE selection is still driven by inherited state
Sum({[Group1]<TRANS_TYPE = {"VOUCHER"}, POST_DATE = {"<=$(=Max(POST_DATE))"}>} (ITEM_QTY*VOU_n)*Cost_Item)
seems he forgot to mark it answered or leave a comment.
I try with this but I get (errors in Expression)
This my Code :
Sum( {1<TRANS_TYPE=StatesA::{"VOUCHER"},
SLIP_FLAG=StatesA::{'0'} ,
OH_STATUS=StatesA::{"*"} - {"Not In inventory"},
POST_DATE=StatesA:: {"<=$(=Max(POST_DATE))"} >}
(ITEM_QTY*VOU_n)*Cost_Item)
!
OMG you are genius
I use the first code
This what I need ^_^
Many Thanks