Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
nagarajuchilveri
Contributor II
Contributor II

MonthYear issue

Hi Guys,

I need a help,

below snapshot,

nagarajuchilveri_0-1714473564702.png

 

Here I have taken from start month to till month,but I need previous month(Mar-24).

I have used formula 1st YTD:

=Num((Sum({< [DATE OF ISSUE1] = {">=$(=( YearStart(now(),0,7) )) <$(=( YearEnd(now(),0,7) ))"}>} Tkts)),'##,###,###')

for previous month I have used below formula:

vStartMonth=Date(AddMonths(Min([DATE OF ISSUE]), 0), 'MMM-YY')

vPreviousMonth=Date(AddMonths(Max([DATE OF ISSUE]),-1),'MMM-YY')

=Num((Sum({< Month1 = {">=$(=(vStartMonth))<=$(=(vPreviousMonth))"}>} Tkts)),'##,###,###')

This is not working. I need to remove Apr-24 month. I have applied condition in dimension also still not working.is 

How to resolve this issue.

 

Regards,

Nagaraju

 

 

 

 

 

 

 

Labels (3)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Perhaps.

=Sum({<Month={">=$(=min(Month))<=$(=Max( Month)-1)"}>} Tkts)

View solution in original post

6 Replies
BrunPierre
Partner - Master
Partner - Master

Try

=Sum({<Month = {"$(=Date(MonthStart(Max(Month), -1), 'MMM-YY'))"}>} Tickets)

nagarajuchilveri
Contributor II
Contributor II
Author

I tried, but it's not working

=Sum({<Month = {"$(=Date(MonthStart(Max(Month), -1), 'MMM-YY'))"}>} Tkts)

nagarajuchilveri_0-1714478016362.png

 

BrunPierre
Partner - Master
Partner - Master

Format the month as such in the script.

Date#(Month,'MMM-YY') as Month

nagarajuchilveri
Contributor II
Contributor II
Author

@BrunPierre 

I got below like this

nagarajuchilveri_0-1714478893988.png

I need Jul-23 to Mar-24,Then I have used below expression 

=Num(Sum({<Month = {">=$(=Date(MonthStart(Min(Month), 0), 'MMM-YY'))<=$(=Date(MonthStart(Max(Month), -1), 'MMM-YY'))"}>} Tkts),'##,##')

but not working.

 

BrunPierre
Partner - Master
Partner - Master

Perhaps.

=Sum({<Month={">=$(=min(Month))<=$(=Max( Month)-1)"}>} Tkts)

nagarajuchilveri
Contributor II
Contributor II
Author

@BrunPierre Thank You!

It's working 

nagarajuchilveri_0-1714736248747.png

Previous month is showing.