Help with Set analysis  Part II
esepulveda Aug 19, 2011 1:40 PMHi Everyone some days ago i did ask a similar question and got very useful feedback, I hope i can get some help again
The scenario is similar, on a straight table, I have grouped rows on each row, since its dimention is based on Date, (ex. Quarter Hour, Day, etc)
Now the problems is that in an expression, no mater what is the dimention grouping (by Quarter Hour or Day) I must calculate a sum based on the following criteria:
 There is a (ContactSateID = 4) in the current bucket
 There is a (IsInqueue = 1) in the current bucket
Then is that is met, calculate the sum of (ContacDuration) or the (IsInQueue = 1) between the:
Max(${<ContactStateID = 4>} ContactStartDateQH)
and
Min(${<IsInqueue = 1>} ContactStartDateQH)
The previous filter I created it the following way:
sum(
{$<
ContactStartDateQH = {"= ContactStartDateQH < max({$<ContactStateID={4}>} ContactStartDateQH ) "}
,ContactStartDateQH = {"= ContactStartDateQH >= max({$<IsInQueue = {1}>} ContactStartDateQH ) "}
,IsInQueue = {1}
>}
ContactDurationQH
)
The wrapping it around an Aggr function, but the problem is that if I take each of the filters out, they behave as expected, the Max{$<>} get the max from the current group and so does the Min{$<>}, but when they are combined, it brakes.
I have tried to come up with some sort of
sum(
{$<
ContactStartDateQH = {">= Max{$<....>}ContactStartDateQH < Min({$<...>} ContactStartDateQH ) "}
,IsInQueue = {1}
>}
ContactDurationQH
)
But I got 0 results back.
I am attaching a file that reflects 100% the scenario that I am working on if you want to play with it
Thanks in advance for any suggestions or comments about the best way to create this, dynamically grouped filter

CommunityTEST.qvw 163.5 K