Sunday, February 10, 2013

How to calculate simple and weighted average of ratio on cube based report

This document is intended to show a few approach to get average calculation based on cube. There is difference between simple average and weighted average.

Define query as below



Create a crosstab, where average query is clearly defined below


Run report

1 comment:

  1. Hi - Your posts are really helpful.

    I have a requirement where I need to show the following table based on Customer - Team grouping-

    Sales Day1 Day2 Day3 .... Day10 Total
    ---------------------------------------------
    Prod1 2 4 1 5 21
    Prod2 1 1 1 4 20
    Total 3 5 2 9 41
    % Total
    Cumulative 3 8 10
    Cum %

    ---so on.

    I am able to bring the data in a list which has Customer, Day number(comes from database) , Prod1 Sales, Prod2 Sales, Total Sales, Cumulative Sales.

    But I am not able to pivot the same i.e displaying the calculated columns in a crosstab.I am using cognos 8.3

    Any suggestion will be really helpful

    ReplyDelete