Calculated Member - MDX Count

Calculated Member - MDX Count

Post by Sandy Or » Sun, 03 Nov 2002 00:51:14



How do you create a calculated measure that returns the count of fact table
records that matches a specific dimension table hierarchy? Can an example
MDX syntax be provided?

Thanks!

 
 
 

Calculated Member - MDX Count

Post by [MS] Hai-Wei » Wed, 06 Nov 2002 16:17:05


Hi Sandy,

MDX command queries the cells inside the cube. It won't go to the source
fact table and dimension table unless you send a "drillthrough" command.

This posting is provided 'AS IS' with no warranties, and confers no rights.

Regards,
Haiwei Xu

 
 
 

Calculated Member - MDX Count

Post by Sandy Or » Wed, 06 Nov 2002 19:52:19


Thanks Haiwei,

I don't think I was clear enough in my question. I basically want to create
a calculated member that is a ratio:

1. A simple example is if I divide a simple measure by another. This is
simple.

2. What I am trying to achieve is the following calculated member:

Numerator = Counts of Measure X belonging to dimension Y member.
Denominator = Total Count of Measure X.

For example, take fruit as a fact table (orange, apple pear etc.) and fruit
types as a dimension containing type 'citrus'. How can I create a calculated
member that gives the ratio of citrus fruits to total fruits?

Calculated Member = count(citrus fruits)/count(all fruits)

Thanks
Sandy



Quote:> Hi Sandy,

> MDX command queries the cells inside the cube. It won't go to the source
> fact table and dimension table unless you send a "drillthrough" command.

> This posting is provided 'AS IS' with no warranties, and confers no
rights.

> Regards,
> Haiwei Xu

 
 
 

Calculated Member - MDX Count

Post by George Spoffor » Thu, 07 Nov 2002 00:33:19


[Measures].[Fruit Count] / ( [Measures].[Fruit Count], [Fruit].[All Fruit] )


> Thanks Haiwei,

> I don't think I was clear enough in my question. I basically want to create
> a calculated member that is a ratio:

> 1. A simple example is if I divide a simple measure by another. This is
> simple.

> 2. What I am trying to achieve is the following calculated member:

> Numerator = Counts of Measure X belonging to dimension Y member.
> Denominator = Total Count of Measure X.

> For example, take fruit as a fact table (orange, apple pear etc.) and fruit
> types as a dimension containing type 'citrus'. How can I create a calculated
> member that gives the ratio of citrus fruits to total fruits?

> Calculated Member = count(citrus fruits)/count(all fruits)

> Thanks
> Sandy



> > Hi Sandy,

> > MDX command queries the cells inside the cube. It won't go to the source
> > fact table and dimension table unless you send a "drillthrough" command.

> > This posting is provided 'AS IS' with no warranties, and confers no
> rights.

> > Regards,
> > Haiwei Xu

--
George Spofford
Microsoft MVP
Chief Architect / OLAP Solution Provider
DSS Lab
http://www.dsslab.com

ISVs & IT organizations: Find out how DSS Lab can speed your development!
 
 
 

Calculated Member - MDX Count

Post by Sandy Or » Thu, 07 Nov 2002 19:21:04


Thanks!


> [Measures].[Fruit Count] / ( [Measures].[Fruit Count], [Fruit].[All
Fruit] )


> > Thanks Haiwei,

> > I don't think I was clear enough in my question. I basically want to
create
> > a calculated member that is a ratio:

> > 1. A simple example is if I divide a simple measure by another. This is
> > simple.

> > 2. What I am trying to achieve is the following calculated member:

> > Numerator = Counts of Measure X belonging to dimension Y member.
> > Denominator = Total Count of Measure X.

> > For example, take fruit as a fact table (orange, apple pear etc.) and
fruit
> > types as a dimension containing type 'citrus'. How can I create a
calculated
> > member that gives the ratio of citrus fruits to total fruits?

> > Calculated Member = count(citrus fruits)/count(all fruits)

> > Thanks
> > Sandy



> > > Hi Sandy,

> > > MDX command queries the cells inside the cube. It won't go to the
source
> > > fact table and dimension table unless you send a "drillthrough"
command.

> > > This posting is provided 'AS IS' with no warranties, and confers no
> > rights.

> > > Regards,
> > > Haiwei Xu

> --
> George Spofford
> Microsoft MVP
> Chief Architect / OLAP Solution Provider
> DSS Lab
> http://www.dsslab.com

> ISVs & IT organizations: Find out how DSS Lab can speed your development!