Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
olguita2014
Creator
Creator

Date Range

Hi,

I want to select year and month, for example year=2017 and month=January.

And in the advanced expression, to show data since January 2016 to January 2017.

Currently my expression is: 

COUNT(distinct {<[Año_Emision_Poliza]={">=$(=Max(Año)-1)<=$(=Max(Año))"}>}Cod_Contratante)

But It does not work when I select the month

Please help me!!!!!!!!!!

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

Something like this should work

=COUNT(distinct {<[DateField]={">=$(=MonthStart(AddMonths(Max([DateField]),-12)))<=$(=MonthEnd(Max([DateField])))"},[Month]=>}Cod_Contratante)

View solution in original post

5 Replies
aarkay29
Specialist
Specialist

Try this

COUNT(distinct {<[Año_Emision_Poliza]={">=$(=Max(Año)-1)<=$(=Max(Año))"},Month=>}Cod_Contratante)

olguita2014
Creator
Creator
Author

Hi,

I want select month, no eliminate Month

aarkay29
Specialist
Specialist

If you want to select month and get values!


COUNT(distinct {<[Año_Emision_Poliza]={">=$(=Max(Año)-1)<=$(=Max(Año))"}>}Cod_Contratante)


Can you please tell me, What do yo mean by the above expression of yours not working??

olguita2014
Creator
Creator
Author

This expresion is correct but I want since January 2016 to January 2017 or since February 2016 to February 2017,

since March 2016 to March 2017.


Depend of my selection of Month and Year.


if I select January 2017, in my expression I need to show data since January 2016 to January 2017

aarkay29
Specialist
Specialist

Something like this should work

=COUNT(distinct {<[DateField]={">=$(=MonthStart(AddMonths(Max([DateField]),-12)))<=$(=MonthEnd(Max([DateField])))"},[Month]=>}Cod_Contratante)