SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


HELP - MDX QUERY - EXCEPTION or MINUS


HELP - MDX QUERY - EXCEPTION or MINUS

Author
Message
seroliare
seroliare
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 4
HY guys, my second time here!
I'm work with MDX query in my job and i need a little help please.

I need to use the hierarchy [CFOP]. [FINANCIAL OPERATION]
be removed from the items below in the query in the end of this post:

[CFOP].[OPERAÇÃO FINANCEIRA].&[7105], [CFOP].[OPERAÇÃO FINANCEIRA].&[511], [CFOP].[OPERAÇÃO FINANCEIRA].&[611], [CFOP].[OPERAÇÃO FINANCEIRA].&[512]

I can not select all the items they are more than 5000 and makes difficult understanding of query and the same will be used in a procedure.

Is there any way? found minus and except it did not work for me

I appreciate if someone can help.


QUERY:

SELECT { [Measures].[REC LIQ FRETE], [Measures].[DESP FRETE], [Measures].[REC LIQ PROD] } ON COLUMNS, { ([LOJA].[ORGANIZAÇÃO].[MARCA].ALLMEMBERS * [ITEM].[ESTRUTURA ITEM].[DEPARTAMENTO].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( { [CFOP].[OPERAÇÃO FINANCEIRA].[All] } ) ON COLUMNS FROM ( SELECT ( { [GERENCIA].[ESTRUTURA GERENCIAL].[All] } ) ON COLUMNS FROM ( SELECT ( { [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[8], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[9], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[2], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[1], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[7], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[6], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[-1], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[5] } ) ON COLUMNS FROM ( SELECT ( { [ORGANIZACAO_CD_AF].[ORGANIZAÇÃO CD].[All] } ) ON COLUMNS FROM ( SELECT ( { [MOVIMENTO].[MOVIMENTO].&[2] } ) ON COLUMNS FROM ( SELECT ( { [STATUS_FATURAMENTO].[STATUS FATURAMENTO].[STATUS].&[ATIVO] } ) ON COLUMNS FROM ( SELECT ( { [LOJA].[ORGANIZAÇÃO].[MARCA].&[1], [LOJA].[ORGANIZAÇÃO].[MARCA].&[2], [LOJA].[ORGANIZAÇÃO].[MARCA].&[3], [LOJA].[ORGANIZAÇÃO].[MARCA].&[7], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[26], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[28], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[34], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[22], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[29], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[35], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[43] } ) ON COLUMNS FROM ( SELECT ( { [DATA_CONTABIL].[DATA CONTÁBIL].[MÊS].&[2013]&[1] } ) ON COLUMNS FROM [ANALISE_FATURAMENTO_SB])))))))) WHERE ( [DATA_CONTABIL].[DATA CONTÁBIL].[MÊS].&[2013]&[1], [STATUS_FATURAMENTO].[STATUS FATURAMENTO].[STATUS].&[ATIVO], [MOVIMENTO].[MOVIMENTO].&[2], [ORGANIZACAO_CD_AF].[ORGANIZAÇÃO CD].[All], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].CurrentMember, [GERENCIA].[ESTRUTURA GERENCIAL].[All], [CFOP].[OPERAÇÃO FINANCEIRA].[All] )


THNK YOU
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search