I am trying to write a case statement in the elastic cube where I need the last date of every month(30 or 31st) to satisfy a condition. Below is the condition:
If (Today < Last date of the month), Average ((Today- Date field 1) - (Today- Date field 2)), Average ((Last date of the month - Date field 2) - (Last date of the month - Date field 1))
Is there a way to calculate the last day within the query?
Please sign in to leave a comment.