Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to create a comparison between two states (StateA and StateB) for below expression.
Appreciate if anybody could help me out to complete the formula using states
Let's assume Dim is Company.
Sum({$<[Business Date]={'>=$(=Date(vStartDate)) <=$(=Date(vEndDate))'},[Boat Name]=,Type={Actual},Year=,Quarter=,Month=,Week=,Day=>} [Cruise Nights])
Thanks
Senarath
Hi, which fields of yours are in alternate states?
If all of them, you can try
Sum({[StateA]}<[Business Date]={'>=$(=Date(vStartDate)) <=$(=Date(vEndDate))'},[Boat Name]=,Type={Actual},Year=,Quarter=,Month=,Week=,Day=>} [Cruise Nights])
versus
Sum({[StateB] }<[Business Date]={'>=$(=Date(vStartDate)) <=$(=Date(vEndDate))'},[Boat Name]=,Type={Actual},Year=,Quarter=,Month=,Week=,Day=>} [Cruise Nights])
If some of fields are in ordinary state you can use in set analysis a syntax like Year=$::Year
This one for your reference:
http://community.qlik.com/message/209604#209604
KR
Elena
Hi, which fields of yours are in alternate states?
If all of them, you can try
Sum({[StateA]}<[Business Date]={'>=$(=Date(vStartDate)) <=$(=Date(vEndDate))'},[Boat Name]=,Type={Actual},Year=,Quarter=,Month=,Week=,Day=>} [Cruise Nights])
versus
Sum({[StateB] }<[Business Date]={'>=$(=Date(vStartDate)) <=$(=Date(vEndDate))'},[Boat Name]=,Type={Actual},Year=,Quarter=,Month=,Week=,Day=>} [Cruise Nights])
If some of fields are in ordinary state you can use in set analysis a syntax like Year=$::Year
This one for your reference:
http://community.qlik.com/message/209604#209604
KR
Elena
Hi Elena,
I tried what you have mentioned. But what I do not understand is how to apply $:: to other expanded areas.
I had read your link as well and still I do not clear as to how to apply $::.
Thanx
The :: denotes a linkage between the fields, so it works in a similar way as to using P(). As an example, if you have a company field that you wish to apply the alternate state to, it would be
Company = State1::Company.
The dollar sign in this instance simply ties back to the base state selections.
Hi Senarath,
have a look at
http://community.qlik.com/docs/DOC-4951
provides good info on set analysis and has a section on using alternate states, which should prove useful to you
hope that helps
Joe
Thanks a lot all...really helpful notes....!!!!