Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

kumarreddy257
Contributor

deducting 1 month exactly from date field

Hi,

I have a date field and i have some measures.

My requirement is like, 1month needs to be deducted subsequently from date field  and data should roll up for each one month.

Can anyone help me how to deduct one month from date field.

Regards,

kumar

4 Replies

Re: deducting 1 month exactly from date field

Hi,

Use Addmonths()

like AddMonths(FieldNAme,-1)

Regards

Regards,
Prashant Sangle
Muthu
Contributor II

Re: deducting 1 month exactly from date field

Kumar

See the Attached Link.

Subtract 1 month from Date Variable in set analysis

Hope this helps

MVP
MVP

Re: deducting 1 month exactly from date field

Hi,

In script try AddMonths() like below

LOAD

*,

AddMonths(DateFieldName, -1) AS LastMonthDate

FROM DataSource;

Regards,

Jagan.

MVP
MVP

Re: deducting 1 month exactly from date field

if I understand your question is like this (30 days rolling?)

Calculating rolling n-period totals, averages or other aggregations

Community Browser