2012-04-16 53 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 & "] ..." 

希望這有助於!