| MDX-How do you write query that returns measure ratio to parent value? |
| Written by Vidas Matelis | |||
| Tuesday, 24 April 2007 19:16 | |||
|
Q: How do you write MDX query that returns measure ratio to parent value? A: Below is example on how is ratio calculated for measure [Order Count] using Date dimension. Using parent function, your MDX is independant on level that you are querying data on. In example below, if you query data at year level, ratio will be calculated to level [All]:
Results of query above:
If you query data at month level, ratio will be calculated comparing to level quarter:
Result of this query:
|
Most read
- How to install Adventure Works SQL DW and Analysis Services 2005/2008 sample database and project
- MDX-How can I get Last (Previous) Year to Date (YTD) values?
- Analysis Services 2005 error: Errors in the metadata manager. The attribute with ID of ., Name of . refer
- MDX-How do you format or round KPI expression value?
- MDX-How do you calculate monthly average of one year, optionally including empty months?
Top Rated
- How to install Adventure Works SQL DW and Analysis Services 2005/2008 sample database and project
- Analysis Services 2005 XMLA script to add/drop existing partition aggregate
- Why In Reporting Services MDX query disappears after leaving "Data" tab.
- When accessing calculation tab in BIDS I am getting error Unexpected error occurred
- In an MDX query how can I get the top 3 sales years based on the order quantity?
- What TCP port SQL Server Analysis Services 2005 uses
- How to calculate YTD monthly average and compare it over several years for the same selected month
- Analysis Services 2005 error: Errors in the metadata manager. The attribute with ID of ., Name of . refer




