Context: I have other columns that might be used for filtering like region. What I want is even if the region is filtered, I still want the calculation to be computed based on the total sum of the whole dataset for that column.
However, Im having this error:
For calculation levels PRE_FILTER and PRE_AGG, the operands can’t be aggregated.
It the throwing the “For calculation levels PRE_FILTER and PRE_AGG, the operands can’t be aggregated.” error because within the sumover() function, you are using the aggregation function such as sum and count
Can you try following for cal1:
distinctCountOver(ifelse({date} >= {curr_month_start_date}, {customer_id}, NULL), , PRE_FILTER)
and following for cal2:
sumOver(ifelse({{date} >= {curr_month_start_date}, {total_amount}, 0), , PRE_FILTER)