-
Named Calculation in Analysis services
I have a fact table
-- State
-- District
-- AmountPerDistrict
I want to add a new calculated field to this schema which will populate the sum of AmountPerDistrict for state. i.e.
State District AmountPerDistrict StateTotal
FL A 5 12
FL B 4 12
FL C 3 12
NY X 7 10
NY Y 2 10
NY Z 1 10
The SQL query example that i tried is this
select
AmountPerDistrict,
(select sum(AmountPerDistrict) from Sales.SalesOrderDetail
where State=abc.State) as StateTotal
from Sales.SalesOrderDetail abc
Please help me achieve this scenario. Any MDX query or named calculation help would be appriciated.
Regards
-
Please Specify the Method You Intend ...
When you use "MDX" and "named calculation" interchangeably, you're talking about two very different things.
1. Do you need to add a named calculation in the data source view?
2. Do all of the State, District and AmountPerDistrict fields already appear in the underlying data? If so, have you pulled the table / view involved into the data source view?
Get back with these specifics and I'll try to provide some guidance.
Thanks!
Bill
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|