MEASURE 'cso FactOnlineSales'[Sales_Amount] = (/* USER DAX BEGIN */ SUMX('cso FactOnlineSales','cso FactOnlineSales'[SalesAmount]) /* USER DAX END */) VAR __DS0Core = SUMMARIZECOLUMNS( ROLLUPADDISSUBTOTAL('cso DimProduct'[BrandName], "IsGrandTotalRowTotal"), "Sales_Amount", 'cso FactOnlineSales'[Sales_Amount] ) VAR __DS0PrimaryWindowed = TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'cso DimProduct'[BrandName], 1) EVALUATE __DS0PrimaryWindowed ORDER BY [IsGrandTotalRowTotal] DESC, 'cso DimProduct'[BrandName] DAX クエリ - DAX | Microsoft Learn