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: 
mario-sarkis
Creator II
Creator II

script

please help

how can i write PeriodeDate > 'one year back' in the script ?

11 Replies
Siva_Sankar
Master II
Master II

Load * your table where PeriodeDate = Max(Year(PeriodDate))-1;

PrashantSangle

Hi,

In Script

try like

PeriodDate > Date(AddYears(PeriodDate,-1))

Note: Carefull about Date Format.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
maxgro
MVP
MVP

maybe this

A:     // TEST DATA

load

  date(makedate(2014) + floor(rand()*(365*2))) as PeriodDate

AutoGenerate   1000;

B:

load

  PeriodDate,

  PeriodDate as NewPeriodDate

Resident   A

where PeriodDate >= AddYears(Today(1), -1)

  ;

anbu1984
Master III
Master III

One year back of current year??

PeriodDate > AddYears(Today(),-1)

nirmalraj_kj
Partner - Contributor III
Partner - Contributor III

Hi,

Can you try this

PeriodDate=Date(addyears(Today(),-1),'Same as PeriodDate format')

Siva_Sankar
Master II
Master II

if you want only previous year data put = symbol in where, if you want data from previous year put > in where condition.

Not applicable

Try this


PeriodeDate >Year(Now())-1

mario-sarkis
Creator II
Creator II
Author

hey max if the PeriodeDate it shows as number how should i write it ?

anbu1984
Master III
Master III

What is format you have in PeriodDate?