Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to get the total value from a table and pass it to a KPI. In the table the expression looks for customers who have bought 3 months ago but who didnt buy in the current month and the previous one.
The expression is
Sum( Aggr(
if(
sum({$<
Year=,
Month=,
Trimester=,
PeriodNumber = {">= $(=Max(PeriodNumber )-2) <=$(=Max(PeriodNumber ))"}
>}
Sell_Cte_Fil.Sell_Fil_Cte) = 0
AND
sum({$<
Year=,
Month=,
Trimester=,
PeriodNumber = {$(=Max(PeriodNumber )- 3)}
>}
Sell_Cte_Fil.Sell_Fil_Cte) > 1,
1, 0
),Sell_Cte_Fil.Filial, Sell_Cte_Fil.%Key_Client, Sell_Cte_Fil.Client))
When I have it in the straight table it works correctly, but in the kpi it gives me the result in 0, I noticed that when I select the current month (November) and the month of 3 months ago (August) it does give me the correct result. So I think it has to do with the fact that for some reason qlik can't see the previous third month
(1 month selected)
(2 months selected)
I was able to solve it I just had to add {1} after the sum to make it ignore the selections
I was able to solve it I just had to add {1} after the sum to make it ignore the selections