
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HELP! Select the previous period and the current selection together
Hello! I would like to get the unique clients from the current selection (selected month-year) to back, being clear all the records of the period including the selected date but excluding subsequent dates (months-years).
The field with which the customer is identified is DOCUMENTO.
The date fields that I have only selected are 2: MES and AÑO , in English MES is month and AÑO y year. I have selected to May 2017, so I do not want to bring me the following months.
Thanks very much community

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maximiliano,
try this:
Sum ({$<Year ={"($=max(Year))"} >}YourField) for current year
Sum ({$<Year ={"($=max(Year(Today)-1)"} >}YourField) for last year year
i hope that helps
Beck

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For example
Sum({<Year = {$(=max(Year))},YearMonth = {"<=$(=max(YearMonth))"},Date={">=$(=vMinYearDate) <=$(vMaxYearDate)"}>}Sales)
I am using this expression to show This year numbers and
Sum({<Year = {$(=max(Year)-1)}, YearMonth = {"<=$(vLYYearMonth)"},Date={">=$(=vMinLYearDate) <=$(vPreviousYeardate)"}>}Sales)
this one to show last year YTD numbers . These expressions will show the numbers till today from the begining of the year and last year begining to same date last year.
This may helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Beck, first and foremost, thank you for your time, I could not make your formulas work, the modifications a little and I could make the first one work, but it's not what I'm looking for either, I do not really understand what the number is bringing, what the logic is.
This is the formula Count (distinct {<FieldNameYEAR = {"<$ (= Max (FieldNameYEAR))"}>} DOCUMENT) .
Footnote: it is easier to name the fields as well (FieldNameYear) since if you only put me Year I do not know if it is the name of the field or it is a function or variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sada, thanks for writing! The truth that I could not apply the formulas, mainly because I do not know your variables like vMinYearDate.
Footnote: we could name the date fields as NameFieldYear so it is not confusing if in the formula you put a function or a field.
Thank you!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maximiliano,
look at this example
i hope that helps
Beck
