
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Previous Month actual Year
Hi,
I want to get the sales of previous month, and the formula gives me the month of last year (november 2019), and what I want is the previous month of actual year (january 2020).
Formula : count({$<Month={"$(=max(Month)-1)"}, PDV_ModelName={'Available on EXIT'},PDV_Boolean={1},StoreDisabled={0}>} ProductId&StoreId)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It dosent' works, but I did find a solution.
count({<VisitDate={">=$(=MonthStart(Max(VisitDate),-1)) <=$(=MonthEnd(Max(VisitDate),-1))"},
PDV_ModelName={'Available on EXIT'},PDV_Boolean={1},StoreDisabled={0}, Month=>} ProductId&StoreId)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this,
count({$<Month={"$(=max({<Year = {"$(=Max(Year))"}>}Month)-1)"}, PDV_ModelName={'Available on EXIT'},PDV_Boolean={1},StoreDisabled={0}>} ProductId&StoreId)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It dosent' works, but I did find a solution.
count({<VisitDate={">=$(=MonthStart(Max(VisitDate),-1)) <=$(=MonthEnd(Max(VisitDate),-1))"},
PDV_ModelName={'Available on EXIT'},PDV_Boolean={1},StoreDisabled={0}, Month=>} ProductId&StoreId)
