Calculated formula

How do i write similar formula in quicksight:
SUM({ INCLUDE [case_id_str] : MIN( DATEDIFF(‘day’, [case_creation_date_utc], [case_resolved_state_date_utc])) })

Hello @Made_Enny !

Could you try the following:

duration: dateDiff({case_resolved_state_date_utc}, {case_creation_date_utc}, 'DD')

final calc: sumOver(min({case_duration_days}), [case_id_str])

Let me know if this works or if you receive any errors!

Thanks i did the same for avg: avg(min({day_duration}), {case_id_str}) but got error : At least one of the arguments in this function does not have correct type. Correct the expression and choose Create again.

Hello @Made_Enny !

Did you use dateDiff to calculate {day_duration}? I would recommend using LAC function so avgOver rather than avg.