Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all, Let’s say we have a very simple fact table with SalesRep that work with one or more Store , and stores that belong to StoreGroup.
For illustrative table we are using SET Analysis for counting the stores per StoreGoup that each SalesRep as an association with.
Dimension is SalesRep and each expression as a set condition to filter the counting for a particular group of stores:
Expression 1 is =count({$<GroupStore={'GRP2'} >} Store)
Expression2 is =count({$<GroupStore={'GRP4'} >} Store)
..etc.
Now if one of the GroupStores is selected , we would expect that the count for stores that do not belong this group would be zero (like what happens with count if column) , but instead what we get is always the count of the stores independently of what Group is selected. I found this very off, since we are using the current selection “$” for the set analysis.
Can someone shade a light on why is QV behaving like this?
(qvw attached)
Thanks in advance
Hi,
You may modify your expression to respondto your selection by Adding '*' in your expression like shown below.
=count({$<GroupStore *={'GRP2'}>}Store)
=count({$<GroupStore *={'GRP4'}>}Store)
'*'Intersection. This binary operation returns a setconsisting of the recordsthat belong to both of the two set operands.
Hopethis helps you.
-Sridhar
This is exactly how set analysis is supposed to work. When you say GroupStore={'GRP2'} - it means "return the result as if GRP2 is selected, regardless actual selection". When you say GroupStore= - it means "return the result as if all groups are selected, regardless actual selection".
The "$" says to obey all other fields selections, but ignore selections for the fields used in "<>".
Regards,
Michael
Hi,
You may modify your expression to respondto your selection by Adding '*' in your expression like shown below.
=count({$<GroupStore *={'GRP2'}>}Store)
=count({$<GroupStore *={'GRP4'}>}Store)
'*'Intersection. This binary operation returns a setconsisting of the recordsthat belong to both of the two set operands.
Hopethis helps you.
-Sridhar