Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis

Hi guys,

i have year,quarter and month fields in my data source. I need set expression for the below cases:

1. current year vs last year

2. Current year quarter vs last year same quarter. For Ex: FY14Q1 vs FY13Q1

3. Current Quarter vs previous quarter of same year

thanks

12 Replies
Not applicable
Author

hi,

yeah as we are by passing.It wil go by the set expression.

http://community.qlik.com/docs/DOC-4252

this will help u understanding rolling months properly.

Thanks

sudhanshu shrivas

Not applicable
Author

Hi Shrivas,

I am having the same problem of calculating the dates and I have used the expression you have just pasted but I am not getting any result....it populates zeros on the fields and dashes on other fields like LYTD and YTD. is the anything that I am doing it wrong? below is the expressions that I have created:

MTD:

Sum({$<MonthId = {$(=Max(MonthId)– 1)}, Year = , Quarter = , Month = >} Counter_Num)

PMTD:

Sum({$<MonthId = {$(=Max(MonthId) – 1)},Year = ,Quarter = ,Month = >} Counter_Num)

Prior Year MTD:

Sum({$<MonthId = {$(=Max(MonthId) – 12)},Year = ,Quarter = ,Month = >} Counter_Num)

YTD:

Sum({$<MonthId = {“<=$(=Max(MonthId))”},Year = {$(=Max(Year))},Quarter = ,Month = >} Counter_Num)

LYTD:

Sum({$<MonthID = {“<=$(=Max(MonthID) – 12)”},Year = {$(=Max(Year) – 1)},Quarter = ,Month = >} Counter_Num)

QTD:

Sum({$<MonthID = {“<=$(=Max(MonthID))”}, QuarterID = {$(=Max(QuarterID))},
Year = ,
Quarter = ,
Month = >} Counter_Num)

PrevYear_QTD:

      • Sum({$<QuarterID = {$(=Max(QuarterID) – 4)},
        Year = ,
        Quarter = ,
        Month = >} Counter_Num)

Not applicable
Author

Hi Guys,

can anyone help please.....