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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display current,previous,next month without any selection...!!

I want to display current month,previous month,next month and Previous to previous Month.

Eg: SEPT(Previous to Previous)

       OCT(Previous Month)

        NOV(Current Month)

         DEC(Next Month)


Note:Without any Selection,I want the following requirement to display on my chart.

5 Replies
ychaitanya
Creator III
Creator III

Try This

Sum({<OrderDate = {">=$(=MonthStart(Today(),-2))<=$(=MonthStart(Today(),+1))"}>}Sales)

Thanks

Chaitanya

MK_QSL
MVP
MVP

Current Month

=Month(Today())

Previous Month

=Month(AddMonths(Today(),-1))

Previous to Previous Month

=Month(AddMonths(Today(),-2))

Next Month

=Month(AddMonths(Today(),1))

Not applicable
Author

not Working

annafuksa1
Creator III
Creator III

Can you post you app ?

please try

Sum({<{$<Month = {$(=Max(Month)-1)}>}>}Sales) for previous month


Anna

goncalo_ricardo_pereira
Partner - Contributor III
Partner - Contributor III

Hello,

You can try this expressions:

Current Month

sum({$<Month = {"$(=Month(Today()))"}, Year = {"$(=Year(Today()))"}>} Sales)


Previous Month

sum({$<Month = {"$(=Month(AddMonths(Today(),-1)))"}, Year = {"$(=Year(AddMonths(Today(),-1)))"}>} Sales)


Previous to Previous Month

Sum({$<Month = {"$(=Month(AddMonths(Today(),-2)))"}, Year = {"$(=Year(AddMonths(Today(),-2)))"}>} Sales)


Next Month

sum({$<Month = {"$(=Month(AddMonths(Today(),1)))"}, Year = {"$(=Year(AddMonths(Today(),1)))"}>} Sales)

Hope it helps.