Hi Team -
I am trying to calculate PeriodOverPeriod i.e. weekly OR monthly OR quarterly (comes from filter).
Below logic works perfectly fine without ifelse clause but as soon as i try to add ifelse based on filter i.e. interval_type it fails with “”
Working logic (Without Ifelse)
concat(substring(toString(periodOverPeriodPercentDifference(max({p50_loadtime}), {start_date}, MONTH, 1)*100),1,5),'%/',substring(toString(periodOverPeriodPercentDifference(max({p90_loadtime}), {start_date}, MONTH, 1)*100),1,5),'%')
Failed logic (Post adding Ifelse)
ifelse({interval_type}='weekly',
concat(substring(toString(periodOverPeriodPercentDifference(max({p50_loadtime}), {start_date}, WEEK, 1)*100),1,5),'%/',substring(toString(periodOverPeriodPercentDifference(max({p90_loadtime}), {start_date}, WEEK, 1)*100),1,5),'%'),
{interval_type}='monthly',
concat(substring(toString(periodOverPeriodPercentDifference(max({p50_loadtime}), {start_date}, MONTH, 1)*100),1,5),'%/',substring(toString(periodOverPeriodPercentDifference(max({p90_loadtime}), {start_date}, MONTH, 1)*100),1,5),'%'),
concat(substring(toString(periodOverPeriodPercentDifference(max({p50_loadtime}), {start_date}, QUARTER, 1)*100),1,5),'%/',substring(toString(periodOverPeriodPercentDifference(max({p90_loadtime}), {start_date}, QUARTER, 1)*100),1,5),'%')
)
Error Message -
Mismatched aggregation. Custom aggregations can’t contain both aggregated and nonaggregated fields, in any combination.