Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Sales for the stores only if they have in same month last year

How to show sales of all the stores whose sales are greater than 0 in same month last year using point in time analysis?

My chart will be something like this, based on Month as dimension.

Month | CY Sales | LY Sales

Jan | 1000| 2000

Feb | 3000| 2000

The issue is for CY Sales, I need to consider only those stores which has sales in Jan of Last year, and the same with LY Sales, consider sales only which has sales Jan of this year, Same for Feb to Feb, and so forth.

CY Sales:

Sum({$<  [Year]= {"$(=max([Year]))"} ,

[Store]=P({$< [Year]={"$(=max([Year])-1)"} >}[Store]) >}

[Sales])

LY Sales:

Sum({$<  [Year]= {"$(=max([Year])-1)"} ,

[Store]=P({$< [Year]={"$(=max([Year]))"} >}[Store]) >}

[Sales])

In P modifier when it is looking at either this year or last year how to make sure that it is respecting the Month Dimension which my chart is using.Once I filter the data based on Month I am getting the correct numbers.

Thanks,

Madhavi