Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

Previous Month expression

Hi Guys,

I am having a field called [As of Date].

I derived [As of Date Month Year] using the [As of Date].

Now I created two variable for Latest Month and Previous month:

vmaxMonth = =max({<[Pull Type] = {'M'}>}[As of Date Month Year])

vPrevMonth = =addmonths((vmaxMonth),-1)

Now I am trying to create a expression:

count(distinct if(([Issues Organisation] = [Raiser Organisation]) and [As of Date Month Year] = '$(vPrevMonth)'
and ([Primary Issue Driver] ='BCBS' or [Primary Issue Driver] ='BCBS - Completeness' or [Primary Issue Driver] ='BCBS - Accuracy' or [Primary Issue Driver] ='BCBS - Timeliness' or [Primary Issue Driver] = 'BCBS - DQ Control Gaps'), Id)) .

Now my Issue is, If I select any date, above expression is not showing data. It is showing only for most recent Data.

My recent data is 11/30. So the expression is showing oct-2015 data. If I make a selection, for suppose may-2015, the experession should display apr-15. But it is displaying 0.

Thanks in advance!



2 Replies

Do you have a sample that you can share?

Creator III
Creator III

Hi Sunny,

In the expression mentioned above. I got the issue, why the expression is failing.

I am using this, [As of Date Month Year] = '$(vPrevMonth)'

which is telling to match current month-year to previous month-year.

Now I need to exclude the [As of Date Month Year] selection, to display the output.

Is there a way to do this?

Please do let me know, if I am not clear