Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last months sale

Hi All,


Using below am getting last year Last month sale (28-FEB-16) but am not getting  29-feb-16 day of sale.

What i want to make changes in this


Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like (change highlighted in red):

(SUM({$<FinancialYear=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)},Quarter=
,
[Posting Date]={">=$(=MonthStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))<=$(=MonthEnd(addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12)))"}
>}
[Gross Sales Amount])

View solution in original post

2 Replies
tyagishaila
Specialist
Specialist

to get 29 feb 16 you have to use MonthEnd().

for better understanding share sample data and required output.

tresesco
MVP
MVP

Try like (change highlighted in red):

(SUM({$<FinancialYear=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)},Quarter=
,
[Posting Date]={">=$(=MonthStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))<=$(=MonthEnd(addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12)))"}
>}
[Gross Sales Amount])