Having trouble with Matrix Percentages

  • Product Type 1 Product Type 2

    2-Jan 4-Mar Total 2-Jan 4-Mar Total

    3 74.25 148.5 225 137.18 116.82 354

    4 33.75 101.25 135 100.62 133.38 234

    5 94.4 141.6 236 98.4 24.6 123

    Product Type 1 Product Type 2

    2-Jan 4-Mar Total 2-Jan 4-Mar Total

    3 33.33% 66.66% 100% 67.00% 33.00% 100%

    4 25% 75% 100% 43% 57% 100%

    5 40% 60% 100% 80% 20% 100%

    Above is the counts and percentages (output i wanted) for the data. There are two column groups.

    1. Product Type

    2. Date

    and and row group as 1. Product Level

    and the values are count(product_key)

    From the source i am returning all the products and then i m counting the product key. I am having trouble calculating percentages on the rows.

    I tried couple of expressions using different scopes but the nearest i reached was returning me percentages for whole row (ex. in table above instead of total = 225 and 354, i was getting percentages on the bases of 225+354)

    Can anyone please suggest me what scope i have to use to achieve this?

    Note: I am using sql server 2005.

  • =COUNT(Fields!product_key.Value)/COUNT(Fields! product_key.Value, "replace this with your dataset name")

    this might help !!!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply