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.
You can find an ‘gentle’ introduction to MDX here