June 15, 2010 at 2:58 pm
SELECT
NON EMPTY {
( Distinct ( [Dim Tempo].[Calendario].[Ano].&[2009]*
[Dim Tempo].[Calendario].[Ano].&[2010]*
[Measures].[Val Pago - Valor Recolhido]*
[Measures].[Val Tributo - Valor Recolhido]))}
DIMENSION PROPERTIES MEMBER_TYPE ON COLUMNS,
NON EMPTY
{CrossJoin ( [Dim Pessoa].[Orgao Sigla].[All].Children,
[Dim Competencia].[Competencia].[All].Children,
[Dim Estabelecimento].[CNPJ Radical].[All].Children,
[Dim Estabelecimento].[CPF CNPJ].[All].Children,
[Dim Estabelecimento].[Inscricao Municipal].[All].Children,
[Dim Estabelecimento].[Razao Social].[All].Children ,
[Dim Estabelecimento].[Status ISS].[All].Children ,
[Dim Pessoa].[Atv Economica Principal].[All].Children ,
[Dim Opcao Simples].[Opcao Simples].[All].Children)
} ON ROWS
FROM [ISS Valor Recolhido]
Try the above. Might have some expression error, missing brackets.
But this will be the format. And why dont you use the Query Designer in SSRS (if your are using SSRS) and do learn some basics of MDX before writing out the code. It will help.
Viewing post 1 (of 2 total)
You must be logged in to reply to this topic. Login to reply