2016-09-21 4 views
0

Как я могу перевести этот запрос MDX, чтобы получить счет всех полных записей? для создания пейджинга на веб-странице?MDX Количество строк и разбиение на страницы

SELECT { 
      [Measures].[Invoice Price], 
      [Measures].[Quantity], 
      [Measures].[Verified Total] 
     } 
      on columns, SubSet(
          NONEMPTY(
          (
          [Distributor].[Distributor].[Distributor].ALLMEMBERS * 
          [Product].[PA Description].[PA Description] * 
          [Time].[Month Name of Year].[Month Name of Year].ALLMEMBERS * 
          [Time].[Month Number of Year].[Month Number of Year].ALLMEMBERS 
          ), 
          { 
           [Measures].[Invoice Price], 
           [Measures].[Quantity], 
           [Measures].[Verified Total] 

           } 
          ) 
          ,0 
          ,5 
       ) 
       DIMENSION PROPERTIES MEMBER_UNIQUE_NAME on Rows from [Reporting] 

ответ

0

Может быть что-то вроде этого:

WITH MEMBER [Measures].[RowCount] AS 
    SubSet(
    NONEMPTY(
     (
     [Distributor].[Distributor].[Distributor].ALLMEMBERS * 
     [Product].[PA Description].[PA Description] * 
     [Time].[Month Name of Year].[Month Name of Year].ALLMEMBERS * 
     [Time].[Month Number of Year].[Month Number of Year].ALLMEMBERS 
     ), 
     { 
     [Measures].[Invoice Price], 
     [Measures].[Quantity], 
     [Measures].[Verified Total] 
     } 
    ) 
    ,0 
    ,5 
    ).COUNT 
SELECT { 
     [Measures].[Invoice Price], 
     [Measures].[Quantity], 
     [Measures].[Verified Total], 
     [Measures].[RowCount] 
     } on 0 
    , SubSet(
    NONEMPTY(
     (
     [Distributor].[Distributor].[Distributor].ALLMEMBERS * 
     [Product].[PA Description].[PA Description] * 
     [Time].[Month Name of Year].[Month Name of Year].ALLMEMBERS * 
     [Time].[Month Number of Year].[Month Number of Year].ALLMEMBERS 
     ), 
     { 
     [Measures].[Invoice Price], 
     [Measures].[Quantity], 
     [Measures].[Verified Total] 
     } 
    ) 
    ,0 
    ,5 
    ) 
    ON 1 
FROM [Reporting]; 

Хотя, конечно, это только 5 ...!

+0

Выполнение этого запроса Выполнение запроса ... Конец ввода был достигнут. Завершить полную проверку без вывода –

Смежные вопросы