Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Numeração dos dias uteis no Mês

Olá,

Preciso comparar os dias uteis com seus correspondentes nos meses anteriores:

Ex:


Comparar todo o 12º dia util de todos os meses


Como faço para identifica-los?


Hoje utilizo um AutoGenerate para gerar o meu calendário, queria colocar nele o campo correspondente, segue:


LET vMinDate = date('01/01/2000', 'DD/MM/YYYY');

LET vMaxDate = date(addyears(Today(),1),'DD/MM/YYYY');

Calendario:

LOAD

  DISTINCT

  Date(Data, 'DD/MM/YYYY') as Data,

  WeekDay(Data) as DiaSemana,

  Date(

  if(

      Month(WeekStart(Data)) <> Month(Data),

      MonthStart(Data),

      WeekStart(Data)

      ), 'DD/MM/YYYY'

  )

  as InicioSemana,

  Date(

      if(

      Month(WeekEnd(Data)) <> Month(Data),

      MonthEnd(Data),

      WeekEnd(Data)

      ), 'DD/MM/YYYY'

  ) as TerminoSemana,

  day(Data) as Dia,

  month(Data) as Mes,

  Year(Data) as Ano,

  Date(MonthStart(Data), 'MMM/YYYY') as MesAno,

  Date(MonthStart(Data), 'MMM/YYYY') as AnoMes,

  Week(Data)                                                                                             as Semana,

     dual(Year(Data) & '-S' & Num(Week(Data),'00') ,WeekStart(Data))                                        as AnoSemana

  ;

LOAD

  date($(#vMinDate)+recno()-1) as Data

AUTOGENERATE $(#vMaxDate) - $(#vMinDate) + 1;

0 Replies