Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

New at MDX - how to get all members in my cube?

$
0
0

Hi,

I'm new to the MDX world.

I have this statement that queries a Cube called WSIFIN:

SELECT 
NON EMPTY {[TIME].[2013.0127],[TIME].[2013.0224],[TIME].[2013.0331],[TIME].[2013.0428],[TIME].[2013.0526],[TIME].[2013.0630],[TIME].[2013.0728],[TIME].[2013.0825],[TIME].[2013.0929],[TIME].[2013.1027],[TIME].[2013.1124],[TIME].[2013.1229],[TIME].[2013.TOTAL]} ON 0,
NON EMPTY {[ACCOUNT.H1].[5202],[ACCOUNT.H1].[5204]} ON 1 
 FROM [WSIFIN] WHERE 
([CATEGORY].[BUDGET2013],[CONTRACTPRD].[ALL_CONTRACT_PER],[DATASRC].[TOTALADJ],[ENTITY].[WSI],[DEPARTMENT].[CONS_DEPARTMENT],[MEASURES].[PERIODIC],[RPTCURRENCY].[LC],[SITE].[S_WSIOVH]) 

In my cube there are other members in the dimension [SITE]. As you can see above I'm using [SITE].[S_WSIOVH]. This pulls back everything I need for S_WSIOVH but I need the same for all my other members like S_ZSW.

I tried adding an 'AND' - but it doesn't work..

SELECT 
NON EMPTY {[TIME].[2013.0127],[TIME].[2013.0224],[TIME].[2013.0331],[TIME].[2013.0428],[TIME].[2013.0526],[TIME].[2013.0630],[TIME].[2013.0728],[TIME].[2013.0825],[TIME].[2013.0929],[TIME].[2013.1027],[TIME].[2013.1124],[TIME].[2013.1229],[TIME].[2013.TOTAL]} ON 0,
NON EMPTY {[ACCOUNT.H1].[5202],[ACCOUNT.H1].[5204]} ON 1 
 FROM [WSIFIN] WHERE 
([CATEGORY].[BUDGET2013],[CONTRACTPRD].[ALL_CONTRACT_PER],[DATASRC].[TOTALADJ],[ENTITY].[WSI],[DEPARTMENT].[CONS_DEPARTMENT],[MEASURES].[PERIODIC],[RPTCURRENCY].[LC],[SITE].[S_WSIOVH])
AND  
([CATEGORY].[BUDGET2013],[CONTRACTPRD].[ALL_CONTRACT_PER],[DATASRC].[TOTALADJ],[ENTITY].[WSI],[DEPARTMENT].[CONS_DEPARTMENT],[MEASURES].[PERIODIC],[RPTCURRENCY].[LC],[SITE].[S_WSIZSW])


qeqw


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>