Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with 3 Fields

I have three fields: Units, Period, Customer

I am trying to use Set Analysis to create a set of sum(Units) where Period = 3 and the Current customer is selected (this value is at least one selected).

I need to use the whole available set not just current because the user can change the Period selection. What is the best way to do this? I have tried

sum({1<Customer=, Period ={'3'}>} Units) and many other possibilities but I still can't get it to function properly. Thanks for your help.

14 Replies
Not applicable
Author

sum({$<PeriodID ={'3'}>} SalesUnit)

^^ This is in the application I attached earlier in the main text box, center screen. I created this after my initial post so sorry if the naming threw you off.
Open the application and select Blue Customer and Last Month. Based on your equation, I should see "30" units, but I'm getting "0", no? What am I doing wrong?


johnw
Champion III
Champion III

Edit: Wait, OK, I see the 0 now, when you DO copy in the expression and do the selections you say, THEN it gets 0. It gets 0 because you are overriding the PeriodID, but making a selection in PeriodDesc. Since these fields are, I gather, the same thing, you ALSO need to tell it to ignore PeriodDesc.

sum({<PeriodID ={'3'},PeriodDesc=>} SalesUnit)

charlotte_qvw
Partner - Creator
Partner - Creator

Try this

sum({$<PeriodID ={'3'}, PeriodDesc = >} SalesUnit)

i.e. you could either set PeriodDesc to be ignored or you could also set it to LastWeek

johnw
Champion III
Champion III

The dollar sign is optional. I prefer to not include it since $ is also used in dollar sign expansion and to identify parameters, but I may be in the minority.

Not applicable
Author

Thank you everyone - sorry if I confused anyone. Charlotte.qvw's answer fixed the problem