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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Set Analysis for Prior Month

Hi All,

I have field called sys_created_on. I have calculated Year Month on basis of this. Below is my expression:

Date( MonthStart( sys_created_on ), 'YYYY-MM') as [Month_Year1]

I extracted max Month using    set v2= max(Month_Year1);

Now I want to see value for prior to max month. I have used below expression:

Count({<Month_Year1 ={"=Date(addmonths($(v2), -2), 'YYYY-MM')"} >} number).

But it is always showing current month data only. Not prior to max month.

Please help.

Thanks,

Sarif

10 Replies
sunny_talwar

I don't see anything wrong with the expression... may be try this without the dollar sign expansion:

Count({$<Month_Year ={">=$(=Date(AddMonths(v1, -13), 'YYYY-MMM'))<=$(=Date(AddMonths(v1, -1),  'YYYY-MMM'))"}>} number)