Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
after having tried all Aggr variations I am still stuck with simple triggered count.
Assume - a button (MaxFilter) selects the wanted focus on a Combo chart - meaning calculating Sums of Amounts either with Maximum per Dimensions or without and showing related Numbers as well:
if(MaxFilter=0,
Sum( {<Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} Value),
Sum( {<Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} Value) -
Max( {<Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} Value)
)
>>This works fine
if(MaxFilter=0,
Count( {<Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} ID),
Count( {<Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} ID) -1
)
>>This does not work for MaxFilter=1 but would if I do remove the "-1". Why can't I reduce QlikViews Count result for the one Max-ID?
Thanks for your help!
Tobias
ok, probably this is just another inappropriate non-Use of Aggr - but I still can´t see how it should work correctly.
>the time dimension is filled day by day
> so in the fact table there are Null Values and therefore my Formula is obviously producing "Null"
> but only in the 2. Part of the IF clause where the Formula is expanded by "-1" as if QV cant't count and substract at a time
Replacing the "-1" with
"- Max({<Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} Value)/
Max({<Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} Value)"
(which equals to -1) is doing the trick! Now it works.
Thanks for your thoughts!
Tobias
Try this:
If(MaxFilter=0,
Count({<Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} ID),
(Count({<Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} ID) -1)
)
Thanks Sunny!
I tried already without any luck. Result is: "-1".
Tobias
Would you be able to share a sample to show what exactly is going on?
ok, probably this is just another inappropriate non-Use of Aggr - but I still can´t see how it should work correctly.
>the time dimension is filled day by day
> so in the fact table there are Null Values and therefore my Formula is obviously producing "Null"
> but only in the 2. Part of the IF clause where the Formula is expanded by "-1" as if QV cant't count and substract at a time
Replacing the "-1" with
"- Max({<Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} Value)/
Max({<Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} >} Value)"
(which equals to -1) is doing the trick! Now it works.
Thanks for your thoughts!
Tobias
If you were able to achieve what you wanted, please close this thread by marking your response as correct.
Best,
Sunny