Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I need to identify the customers who bought in two periods and exclude those who bought in one and not in another.
In my example, Periods: 2018 and 2010, I use the following expression:
if(Sum({<[Año]={2019}>} Cantidad)>0 and Sum({<[Año]={2018}>} Cantidad)>0,Sum(Cantidad))
Work almost perfect. Customers who did not buy in some period show them void. But the total is equal to the sum of all.
Regards.
Perhaps this
Sum(Aggr(if(Sum({<[Año]={2019}>} Cantidad)>0 and Sum({<[Año]={2018}>} Cantidad)>0,Sum(Cantidad)), Cust))
Perhaps this
Sum(Aggr(if(Sum({<[Año]={2019}>} Cantidad)>0 and Sum({<[Año]={2018}>} Cantidad)>0,Sum(Cantidad)), Cust))
Sorry for the delay. It works perfect. But I have another problem, when I put that formula by month it doesn't separate it by year. Place the total in a single column.
Regards.
You have to include all dimensions from the report, If only one you can simply use one dimension on the Aggregate function.
Sum(Aggr(if(Sum({<[Año]={2019}>} Cantidad)>0 and Sum({<[Año]={2018}>} Cantidad)>0,Sum(Cantidad)), Cust, Month))