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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

previous month Data

Dear All,

i want to display previous month data on current month selection consider the below scenario.

sc.PNG

Here for Jan Month TS is 10 so output will be like for Feb Month it must show the value 10 and so on . field (Date) must be in dimension

6 Replies
Chanty4u
MVP
MVP

try dis,

=sum({<Date={">=$(=Date(monthstart(addmonths(max(Date),-1))))<=$(=Date(monthend(addmonths(max(Date),-1))))"}, Year=,Month=, Date=>}TS

sunny_talwar

Try exploring the Above() function or provide a sample app to help better

Chanty4u
MVP
MVP

=If(Sum(TS) > 0, Above(Sum({<Date, MonthYear>}TS)))

Anonymous
Not applicable
Author

Day:

LOAD * INLINE [

    Day, Sales

    01/01/2015, 10

    01/02/2015, 20

    01/03/2015, 30

    01/04/2015, 40

    01/05/2015, 50

];

Sum({<Day ={'$(vmonth)'}>}Sales)

vmonth = Date(MonthStart(MonthStart(Day)-1))

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try Above() in Qlikview Help file

=Above(Sum(Sales))

Regards,

Jagan.

HirisH_V7
Master
Master

Hi,

May be like this,

When you select a Month Report will show previous month data,

Sum({<Month={"$(=Month(MonthStart(Max(Date))-1))"}>}Sales)

Previous Month Data-204801.PNG

PFA,

Hope this Helps,

HirisH
“Aspire to Inspire before we Expire!”