Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I´m trying to create a SSS indicator (on a pivot table) to compare sales 364 days after the selected date, something like:
sum sales if 364 day ago Sales<>0
How can I create this value? please any help is more than welcome.
Thanks,
Camilo
Mmm I added Mes and Año to de group clause but nothing happen, if I dont have a Date but Year (2008, 2009, 2010... etc) and month (1, 2, 3... 12) only, how should I write the script? I´m trying something like:
SSSSales:
LOAD AñoMes,
Año,
Mes,
Local,
Local &'-'& num(AñoMes) as LocalDate,
sum(Real) as SumSales
resident Data group by Local, AñoMes, Año, Mes;
SSSDates:
left join (Data) Load AñoMes, Local, Año, Mes,
if (Lookup('SumSales','LocalDate',Local&'-'&num(Año-1) &'-'& num(Mes),'SSSSales')>0, 1) as SSS
Resident SSSSales;
drop table SSSSales;
What do you mean with nothing happen? Do you still get a script error? Can you tell at which part line (e.g. by commenting some parts out?
Then, check if your SSSSales table is built correctly (by commenting out the SSSDates table load and the drop table). One step after the other.
Then, check that your format of AnoMes used for LocalDate in SSSSales and the lookup in SSSDates are identical, e.g. by putting
Local&'-'&num(Año-1) &'-'& num(Mes) as LocalDateprev
in the SSSSales table, just for inspection.