
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate Previous Month Record Count
We have a calculation in an app that Gets count of records from previous month.
All individual variables seem to be working.
however, the calculation returns zero.
Calc= count({$<RecordCurrent_Month = {"Previous_Month_End"}>}Month_end_note_id)
WHERE
RecordCurrent_Month = date(DATA_DATE,'MM/YY')
Previous_Month_End = date(addmonths(DATA_DATE,-1),'MM/YY')
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am sharing a .qvf file showing how I would solve this using The As Of Table.
All you need to know about that is described on this post: The As Of Table . I don't think I can explain better than Hic.
I hope it solve your needs.
https://www.linkedin.com/in/rodrigo-pennacchi/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This set analysis is going row wise, so there is no data where current_month=previous_month in backend in the same row,
try this
Calc= count({$<RecordCurrent_Month = {"=$(=date(addmonths(DATA_DATE,-1),'MM/YY') )"}>}Month_end_note_id) it should
work when data can be in tabular format like in charts and table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gabbar,
Thanks for reaching out.
i had to replace data_date but otherwise i copied the above. I verified that the addmonths calc works too.
count({$<RecordCurrent_Month = {"=$(=date(addmonths(common_loan_wam_month_end_date,-1),'MM/YY') )"}>}Month_end_note_id)
The above returns zero still. I am using a pivot table, not sure if that plays a factor.
Thank you,
Alec

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
count({$<RecordCurrent_Month = {"=$(=date(addmonths(RecordCurrent_Month,-1),'MM/YY') )"}>}Month_end_note_id)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No luck. date(addmonths(RecordCurrent_Month,-1),'MM/YY') is valid however.
Results in the screen shot, even included the previous month calculation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please share a sample dataset for the same.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure, here is an xlsx of the non-sensitive data involved.
This should be enough @Gabbar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Will update the solution as soon as i am able to find, till then
try this:
Above('Your Normal Set expression of current month')
Sort your data in ascending order according to recordcurrent_month

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am sharing a .qvf file showing how I would solve this using The As Of Table.
All you need to know about that is described on this post: The As Of Table . I don't think I can explain better than Hic.
I hope it solve your needs.
https://www.linkedin.com/in/rodrigo-pennacchi/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So sorry for the delay. @rpennacchi solution worked.
Thank you all for your efforts.
