Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Re: Same Store Sale Indicator

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;

Highlighted
MVP
MVP

Same Store Sale Indicator

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.