Date Expression Assistance - Total Value for Current Month?

Not sure why i am on the struggle bus with date math but here we are again.
Making progress on the call log app, but i would like to add a virtual column that shows the total minutes of call time logged on a per-patient basis. 

The Call Log table has a call start and call end column, with a call duration virtual column that calculates the difference. 
I see there is a function EOMONTH() that returns the last day of a month, but i am not finding a "built in" method for just grabbing the span of time that equates the current month.

Is there a simple way to get the sum of the 'Call Duration' column for the current patient (call logs are attached by ref to the _patientIdentifier key), or do I need to make up something?

Thanks

0 2 46
2 REPLIES 2

Fรผr einen Slice-Ausdruck fรผr "last month":

MONTH([dateColumn])=MONTH(EOMONTH(TODAY(), -1))

Try by making a string you can compare.

If you are on the Patients table and you have a Related Calls VC where the [Call Start] is datetime and [Call Duration] is Duration, you could do something like this on a new VC of the Patients table:

SUM(
 SELECT(
  [Related Calls][Call Duration],
  TEXT([Call Start], "MM-YYYY")=TEXT(TODAY(), "MM-YYYY")
 )
)
Top Labels in this Space