Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dados com mes maior que o atual

Podem me ajudar?

Preciso trazer apenas os dados que tem o mes maior que o mes atual, tentei usar esse scritpt:

vTempo=num(month(today(0)));

LOAD

Data1,

  Valor

FROM

TESTEDATA.xlsx

(ooxml, embedded labels, table is Plan1)

where (num(month(Data1)) >= 'vTempo');

Mas nao esta retornando nada.

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Even better would be this:

LOAD

Data1,

Valor

FROM

TESTEDATA.xlsx

(ooxml, embedded labels, table is Plan1)

where MonthName(Data1) >= MonthName(Today());

HTH

Best,

Sunny

View solution in original post

4 Replies
sunny_talwar

Try may be this:

LOAD

Data1,

Valor

FROM

TESTEDATA.xlsx

(ooxml, embedded labels, table is Plan1)

where Month(Data1) >= Month(Today());

HTH

Best,

Sunny

sunny_talwar

Even better would be this:

LOAD

Data1,

Valor

FROM

TESTEDATA.xlsx

(ooxml, embedded labels, table is Plan1)

where MonthName(Data1) >= MonthName(Today());

HTH

Best,

Sunny

Not applicable
Author

Thanks so much for answer me

Perfect:

My doubt:

Its better did I use MonthName? I was using the number for month  with num(month(today(0))).

I was testing now in my dashboard real, and I have just month, no date, I have a column with Month (abr, mai, jun,....)

I was doing num(month(Month)) comparing with month actual.

sunny_talwar

Personally I like using MonthName which formats as Apr-2015, but I don't think there is too much problem using Num(Month(Today()))

HTH

Best,

Sunny