1

年ごとに上位 5 件の顧客があり、この情報を年ごとに異なる年に同時に取得するクエリを作成したいと考えています。つまり、次のようになります。

select 
[Measures].[Ventas] 
on columns,
non empty
topcount
(
[Dim Cliente].[Company Name].Children,5,[Measures].[Ventas]
) 
on rows
from 
[DWH Northwind]
where 

[Dim Tiempo].[Año].&[1996]

トップ5 1996

トップ5 1996

1996 年のトップ 5 と 1997 年のトップ 5 を年ごとに分けて一緒に入れることはできますか?

4

2 に答える 2

2

これを試して

select 
[Measures].[Ventas] 
on columns,
non empty
{
topcount
(([Dim Tiempo].[Año].&[1996],[Dim Cliente].[Company Name].Children),5,[Measures].[Ventas]) 
,
topcount
(([Dim Tiempo].[Año].&[1997],[Dim Cliente].[Company Name].Children),5,[Measures].[Ventas]) 
}
on rows
from 
[DWH Northwind]
where 
于 2020-05-02T02:56:36.393 に答える