Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor

Counter on QlikSense

Hello everyone,

I created an AutoNumber() on QlikView and it works ok. But on QlikSense it isn't working as well.

The Calendar is by week. So every line is a different week.

Every Vitrine has 4 week and the 13th Vitrine has 5 weeks.
I'm breaking the calendar into Vitrines to number every week in the Vitrine.

On QlikView the result is:

It is correct.

On QlikSense the result to the same code is:

On QlikSense continues counting the line even though I store and drop the table Calendario and read again.

The code:

FOR vAno = 2012 to $(vMaxAno) // This variable is to set the max year that I have order

    FOR  vVitrine = 1 to 13



        LOAD Ano,




             Semana            as CalendarioSemana

        FROM [lib://App Data (global_ueg023)/dados\Ext\Calendario.qvd]



          //In this part is selected just the 4 or 5 lines of the current Vitrine


        LOAD Ano                                as Ano,

             Vitrine                                as Vitrine,

            CalendarioSemana                    as Semana,

            right(CalendarioSemana, 2)            as [Semana do Ano],

            Date(SemanaDtInicio, 'DD/MM/YYYY')     as [Inicio Semana],//AS [Pedido (Data de Início da Semana)],

             Date(SemanaDtFim, 'DD/MM/YYYY')     AS [Fim da Semana] //[Pedido (Data de Fim da Semana)]

        Resident Calendario

        Where Ano = $(vAno) and

            Vitrine = $(vVitrine)

        order by CalendarioSemana;


        drop table Calendario;


        Store CalendarioVitrine1 into [lib://$(DataFolder)/Ext/Calendario/Calendario_$(vAno)_$(vVitrine).qvd](qvd);


        drop table CalendarioVitrine1;



        Load *,

             AutoNumber(Semana)    as SemanaMes

        FROM [lib://$(DataFolder)/Ext/Calendario/Calendario_$(vAno)_$(vVitrine).qvd]



        Store CalendarioVitrine into [lib://$(DataFolder)/Ext/Calendario/Calendario_$(vAno)_$(vVitrine).qvd](qvd);


        drop table CalendarioVitrine;




Someone know why it's happening?

Community Browser