
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is possible to use alternate States with set analysis
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
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Like this:
Sum( {1+ Group1<TRANS_TYPE={"VOUCHER"} ,POST_DATE= {"<=$(=Max(POST_DATE))"} >} (ITEM_QTY*VOU_n)*Cost_Item)
Regards,
Mayank


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mayank
I try this before, It gives me an error number


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to share sample qvw and error screenshot here.
Regards,
Mayank

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
seems he forgot to mark it answered or leave a comment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OMG you are genius
I use the first code
This what I need ^_^
Many Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- « Previous Replies
-
- 1
- 2
- Next Replies »