Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mohammadkhatimi
Partner - Specialist
Partner - Specialist

How to show last Yr and last month...in set analysis

Hi Everyone,

How to show last Fiscal Month of Last Fiscal year.

For e.g- Fiscal year-2015-2016 Apr Month is selected....the data should show March of Fiscal Year 2014-15.

Any help would highly appreciate.......................

Regards,

Mohammad

18 Replies
hariprasadqv
Creator III
Creator III

buzzy996
Master II
Master II

try these,

Last year:

=num(sum({$<Year = {$(=only(Year) - 1)}, Month = {"<=$(=max(Month))"}>} LineSalesAmount), '$#,##0;($#,##0)')

Last Month:

sum({$<Year = {$(=only(Year) - $(=if(only(Month) = 1, 1, 0)))}, Month = {$(=month(addmonths(MonthYear, -1)))}>} LineSalesAmount)

Not applicable

hi,

for YTD  =>variable   MaxDate=max(DATE)

Sum({$<FinYear=,FinMonth=>}InYearToDate(DATE,'$(MaxDate)',0,4) * -1 *(([Amount])))

LYTD

Sum({$<FinYear=,FinMonth=>}InYearToDate(DATE,'$(MaxDate)',-1,4) * -1 *(([Amount])))

MTD

Sum({$<FinYear=,FinMonth=>}InMonthToDate(DATE,'$(MaxDate)',0,4) * -1 *(([Amount])))

LMTD

Sum({$<FinYear=,FinMonth=>}InMonthToDate(DATE,'$(MaxDate)',-1,4) * -1 *(([Amount])))

Regards

Vimlesh

mohammadkhatimi
Partner - Specialist
Partner - Specialist
Author

Hi Shiva,

I want last yr and last month in one expression

buzzy996
Master II
Master II

u mean 2014 dec?

Not applicable

Hi,

Look at this app.

Regards

Vimlesh

mohammadkhatimi
Partner - Specialist
Partner - Specialist
Author

no i want fiscal yr

For e.g- Fiscal year-2015-2016 Apr Month is selected....the data should show March of Fiscal Year 2014-15.

mohammadkhatimi
Partner - Specialist
Partner - Specialist
Author

Wher is the app...

please attached

Not applicable

hi,