Filters make Aggr Expressions stop working properly
Hello guys,
I'm working on an employee performance model and I'm facing several issues when using aggregated functions and filters.
I have made and uploaded and example of what the data looks like and what I wish the end result would look like. I really hope it helps me explain my problem, but If you guys have any doubts please go ahead and ask me 🙂 .
Ok so, I have tried using expressions like
Aggr(Sum(Aggr(max(Aggr(if(
Number_Of_Products=0 AND SalesAmount>3000000,
1,0),ORDER_ID)),CUSTOMER_ID)),EMPLOYEE_ID)
Which successfully calculates what I want. However, It only works properly if I have only 1 month activated as a Filter. If I have more than one month activated in the filter pane, the results are not calculated properly. (Off by 5%~ if that matters).
I'm a Qliksense newbie and feel like I'm doing a really silly mistake, but I just can't figure it out on my own.