Enrique
Enrique

Reputation: 153

MDX Help and tutorial

Hello guys again here with my MDX headaches (why does my boss think programmer = solve anything computer related).

The measure of the Filter Productos is compose this way [Casa].[Linea].[Producto] and I am trying to filter by Linea 72 and 74, outside this anyone know a good tutorial online or book for MDX?

Anyways here my MDX so far

SELECT 'Dic 1 2010' AS Fecha, A.*
from (SELECT "[Measures].[Piezas Dia]", "[Measures].[P Redondeadas]" FROM openrowset('MSOLAP' ,'DATASOURCE=XXX ;Initial Catalog=XXX ; User Id=XXX;Password=XXX;', 'WITH SET [Lineas] AS '' FILTER(DESCENDANTS([PRODUCTOS],[LINEA],SELF),
ANCESTOR([PRODUCTOS].CURRENTMEMBER,SELF) <> [74 VARIOS] AND
ANCESTOR([PRODUCTOS].CURRENTMEMBER,SELF) <> [72 VARIOS] )'' Member [Measures].[Piezas Dia] AS ''sum([Lineas],[Measures].[|P| Venta Dia Año Actual])''
Member [Measures].[P Redondeadas] AS ''sum([Lineas],[Measures].[Venta Piezas Redondeadas])'' SELECT {[Measures].[Piezas Dia], [Measures].[P Redondeadas]} on columns FROM [Venta Gerencial] WHERE ([Fecha Diario].[Fecha].&[2010].&[12].&[1])')) as A

Thanks for all help provided.

Upvotes: 1

Views: 2541

Answers (3)

DataGirl
DataGirl

Reputation: 449

You asked for a book referral. My boss just purchased SQL Server 2008 MDX Step by Step for me. I'm beginning to go through it and I like the way it is laid out. I've been programming in T-SQL for over ten years and MDX is just close enough to confuse me. This book is helping me think different about my code and coding practices. I haven't finished it, but I do think that it might be a good one for you to start with, as you can jump in anywhere in the book to learn what you need to know.

Upvotes: 4

ic3
ic3

Reputation: 7690

You can find an 'gentle' introduction to MDX here

Upvotes: 7

claj
claj

Reputation: 5412

Should it really be a , instead of a ; here:

FROM openrowset('MSOLAP' ***,*** 'DATASOURCE=HDZNT10

Upvotes: 1

Related Questions