Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table where one of the columns just needs to display the count for all the records that occur in the current month. However, my current expression is returning all the records that contains any date data for [DATE_FIELD_A].
My current expression for this particular column is:
=Count(If(Month(Today()=Month([DATE_FIELD_A])),[DATE_FIELD_A]))
Logic:
Select count where [DATE_FIELD_A] is = CurrentMonth
This zero'd out my data for the column but I appreciate the help.
I was able to get it working by creating a variable in the load script to evaluate the date field against current month and return a 1/0 value. We just filter out all non-matched dates in the sheet column expression.
In load script:
If(MonthStart([DATE_FIELD_A])= MonthStart(Today()),1,0) as COD_InMonth,
In column expression:
=Count({<COD_InMonth={1}>}[DATE_FIELD_A])
Solution used was taken from 'johnca':
Count({< [DATE_FIELD_A]= {"$(='>=' & Date(MonthStart(Max( [DATE_FIELD_A]))) & '<=' & Date(Max( [DATE_FIELD_A])))"}>} [DATE_FIELD_A])
This zero'd out my data for the column but I appreciate the help.
I was able to get it working by creating a variable in the load script to evaluate the date field against current month and return a 1/0 value. We just filter out all non-matched dates in the sheet column expression.
In load script:
If(MonthStart([DATE_FIELD_A])= MonthStart(Today()),1,0) as COD_InMonth,
In column expression:
=Count({<COD_InMonth={1}>}[DATE_FIELD_A])
Solution used was taken from 'johnca':