2012-04-16 52 views
1

嗯,我有一个“member monthname as()”为一个月参数使用WITH MEMBER

每这里我查询的一部分

member Diciembre as 
(
([Dim Tiempos].[Año-Mes].[Año].&[@anioact].&[12],([Measures].[venta]),[Dimregion].[Puntovta].&[@cedis],[Dimproductos].[Categoria].&[Agua 20 Lt]) 
-([Dim Tiempos].[Año-Mes].[Año].&[@anioant].&[12],([Measures].[venta]),[Dimregion].[Puntovta].&[@cedis],[Dimproductos].[Categoria].&[Agua 20 Lt]) 


) 

select {Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre} on columns, 
FILTER(
{[Dimrutas].[Ruta].Members}, 
(([Measures].[Venta]),[Dimregion].[Puntovta].&[@cedis],[Dimproductos].[Categoria].&[Agua 20 Lt]) > 0 
)ON ROWS 

from CuboBebidas 
where ([Dimproductos].[Categoria].&[Agua 20 Lt],[Dimregion].[Puntovta].&[@cedis]) 

,如果我不使用参数它工作正常! 现在我需要通过它来报告服务,我需要参数

你可以看到我有@name参数,在那里我需要这些参数,但它不适用于 只有它。

@anioact= user will one year 
@anioant= @anioact-1 
@cedis=a intenger number 

那我该怎么办呢?

回答

1

SSRS的MDX查询中的参数可能是[whatever]中的一个痛点。我的建议是用这些参数建立一个字符串。查询应该看起来如下:

="member ... [Dimregion].[Puntovta].&[" & Parameters!cedis.Value & "] ..." 

希望这有助于!