Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

philmywallet
Contributor

Set Analysis Previous Month

Hi

Could someone give me an example of how to get the previous month's data only in set analysis for PK_Date.

I am currently using the below as a dimension, which returns previous month (then I suppress Null).

I know it would be better to make it an expression.Any help appreciated.  My dimension formula is:

MonthName(MonthStart(Today())-1)=(MonthName(PK_Date)),(MonthName(PK_Date))

How do I make it a set analysis? or is there a better way?

n.b.  PK_Date is month level only

Cheers

Phil

1 Solution

Accepted Solutions

Re: Set Analysis Previous Month

May be this

Sum({<PK_Date = {"=MonthName(PK_Date) = MonthName(Today(), -1)"}>}Measure)

2 Replies

Re: Set Analysis Previous Month

May be this

Sum({<PK_Date = {"=MonthName(PK_Date) = MonthName(Today(), -1)"}>}Measure)

philmywallet
Contributor

Re: Set Analysis Previous Month

Thanks