| MDX-How can I get attribute key with MDX |
| Written by Ramunas Balukonis | |||||||||||||||||||||||||||||||||||||||
| Monday, 11 June 2007 06:38 | |||||||||||||||||||||||||||||||||||||||
|
Q: How can I get attribute key with MDX A: To do so, use Member_Key function:
Added May 19, 2009 by Vidas Matelis. You can also get the same results by using Properties("Key") function:
For coposite keys Member_Key and Properties("Key") will return NULL values. You should use Properties("Key0"), Properties("Key1"), etc to get composit keys:
Here are results for the last query:
Note: There is performance penalty when you convert dimension key to a measure.
|
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?
- What TCP port SQL Server Analysis Services 2005 uses
- MDX-How do you calculate monthly average of one year, optionally including empty months?
- MDX-How do I calculate sales for 12 Month to date?








I added some explanation about composite keys to this FAQ entry.