For a specific dimension I need to compare 2 different levels of aggregations and conditionally format the columns based on the calculations. My existing calculation is
And based on the value of Flag I need to color code a column.
But here in this calculation aggregated level is another calculation , That will change based on the Benchmark parameter selection.
Now my requirement is I need to do the comparison for avg of those metrics, and while doing that I am getting Aggregation Mismatch error
Flag=
ifelse(
({comparative_metric_category}=‘Retain’ AND avg({store_aggregated_count})< avg({Aggregation level})) OR
({comparative_metric_category}=‘Train’ AND avg({store_aggregated_count})> avg({Aggregation level})) OR
({comparative_metric_category}=‘Engage/EVP’ AND avg({store_aggregated_count})> avg({Aggregation level})) OR
({comparative_metric_category}=‘Recruit’ AND avg({store_aggregated_count})> avg({Aggregation level})) OR
({comparative_metric_category}=‘Staffing’ AND avg({store_aggregated_count})> avg({Aggregation level})) OR
({comparative_metric_category}=‘Wages’ AND avg({store_aggregated_count})> avg({Aggregation level})),1,
avg({store_aggregated_count})= avg({Aggregation level}),2,
0)
But I am getting the below error
I tried of creating Individual Avg value calculations for all levels and used that, still i am getting that error.
Can anyone help to resolve this calculation issue?