简体   繁体   中英

SOP for using default measures in MDX and SSAS

I'm going through one of the few highly-rated books on MDX, Practical MDX Queries and the book makes heavy use of the fact you can use default measures in MDX. Personally, I don't like this feature and I think whatever amount of keystrokes it saves ultimately isn't worth it. What's the harm in explicitly stating what you're looking from?

select
from
[cube name]

just seems like you're inviting trouble, and it gets worse when you throw something into the slicer. Any other opinions on this?

In some cases you want your MDX query to take into account the changes you made in the cube configuration without rewriting it.

You can still add [dim].[hierarchy].DefaultMember in your slicer but it is useless and makes the query less readable.

In my experience, relying on the default measure is usually bad luck. It's better to be explicit and avoid surprises later.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM