Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Calculated measures in a dimension?

Author  Topic 

SQLsearcher
Starting Member

47 Posts

Posted - 2007-02-19 : 11:38:39
Dear All

How do you add two columns with calculated data to a report?

I am using MS Sql Server 2005.

In Analysis Services I have a simple star schema, consisting of one facttable and four dimensions. The facttable is called Costs. It has only one attribute / measure. The four dimensions are Time, Project, CostType and Finance. After creating a cube, I built a report (called ProjectReport) in Reporting Services. In my report I first select a reporting period and a project. This leaves two dimensions, which I store in a matrix with CostType as rows and Finance as columns. CostType contains values like '3rd Party Costs' and 'Other Costs'. And Finance contains values like 'Budget' and 'Actuals'. It looks a bit like this:

Project: XXX.0.X/X/0
Period: 2007 01 - 05
......................FINANCE....
..................Budget..Actuals
3rd.Party.Costs......100......200
Other.Costs..........200......600

Now I want to add a new column (Relative) which is calculatd from column Budget and column Actuals: Relative = 100 * Actuals / Budget (%). It should look a bit like:

Project: XXX.0.X/X/0
Period: 2007 01 - 05
..........................FINANCE..........
..................Budget..Actuals..Relative
3rd.Party.Costs......100......200......200%
Other.Costs..........200......600......300%

I tried to use calculated measures in my cube, but this adds the column Relative to EVERY column. I also tried calculated members in dimension Finance. But that also did not do the trick. I probably did something wrong. I just don't know what.

Thanx, Sql Searcher


Mostly harmless
   

- Advertisement -