You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

It happens very frequently that we use a few drill downs in our tables, and we want to calculate the average of indicators at different levels.

In the table below, you can see two drill down levels (Employee Name and Product). And the Avg. Rating is calculating the average rating for that employee on that product.

But you may want to compare the average rating per employee per product with the overall employee rating for the same product as a benchmark, as it is shown in the Avg. Benchmark column. This could be added as a conditional formatting, so if the employee's avg. rating on a product is higher than overall employee's rating on this product, we can highlight in the table.

Here is how you could calculate this.

if(!equals(substringBefore(memberValue(), ' ') ,'Product')) { 
  return ''; 
} else { 
  filter("L_PRODUCT in ('" + memberValue() + "')") {crossValue('CUBE_DAILY_CALLS.DAILY_CALLS','M_RATING@AVG')}; 
}

It is recommended to get familiar with crossValue formula before proceeding with this tutorial. As crossValue will not take drill downs applied in the context view.

  • No labels