Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
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

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

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.

tresB
Champion III
Champion III

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])