Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Axis0 was referenced before it was evaluated

$
0
0

Hi,

I am get "Axis0 was referenced before it was evaluated" when I executed the query below

SELECT
  {
    SUBSET(
      Order(
        HIERARCHIZE(
          NONEMPTY(
            CROSSJOIN(
              HIERARCHIZE(
                {
                  [Claim Type].[Claim Type Name].[Claim Type Name].ALLMEMBERS
                }
              ),
              HIERARCHIZE(
                {
                  [Aging Bucket].[Aging Bucket Name].&[0 to 15 Days],
                  [Aging Bucket].[Aging Bucket Name].&[16 to 30 Days],
                  [Aging Bucket].[Aging Bucket Name].&[31 to 60 Days],
                  [Aging Bucket].[Aging Bucket Name].&[61 to 90 Days],
                  [Aging Bucket].[Aging Bucket Name].&[90 Days Plus]
                }
              )
            ),
            {
              CROSSJOIN(
                {
                  [Measures].[Exp  Amt],
                  [Measures].[Claim % of Col],
                  [Measures].[Claim % of Row],
                  [Measures].[Exp  % of Col],
                  [Measures].[Exp  % of Row],
                  [Measures].[Num of Claims],
                  [Measures].[ Cycle % of Apl Claims],
                  [Measures].[ Cycle % of Apl Exp ]
                },
                CROSSJOIN(
                  {
                    [Begin Service Dt].[Calendar Hierarchy].[Calendar Year].&[2012]
                  },
                  {
                    [Time Calculations].[Time Calculations].[Prior Year]
                  }
                )
              )
            }
          )
        ),
        [Claim Type].[Claim Type Name].CURRENTMEMBER.PROPERTIES('CAPTION'),
        BASC
      ),
      0,
      100
    )
  } DIMENSION PROPERTIES PARENT_UNIQUE_NAME, MEMBER_TYPE, MEMBER_VALUE ON COLUMNS,
  {
    SUBSET(
      HIERARCHIZE(
        NONEMPTY(
          {
            [Measures].[Exp  Amt],
            [Measures].[Claim % of Col],
            [Measures].[Claim % of Row],
            [Measures].[Exp % of Col],
            [Measures].[Exp  % of Row],
            [Measures].[Num of Claims],
            [Measures].[ Cycle % of Apl Claims],
            [Measures].[ Cycle % of Apl Exp ]
          },
          {
            CROSSJOIN(
              CROSSJOIN(
                HIERARCHIZE(
                  {
                    [Claim Type].[Claim Type Name].[Claim Type Name].ALLMEMBERS
                  }
                ),
                HIERARCHIZE(
                  {
                    [Aging Bucket].[Aging Bucket Name].&[0 to 15 Days],
                    [Aging Bucket].[Aging Bucket Name].&[16 to 30 Days],
                    [Aging Bucket].[Aging Bucket Name].&[31 to 60 Days],
                    [Aging Bucket].[Aging Bucket Name].&[61 to 90 Days],
                    [Aging Bucket].[Aging Bucket Name].&[90 Days Plus]
                  }
                )
              ),
              CROSSJOIN(
                {
                  [Begin Service Dt].[Calendar Hierarchy].[Calendar Year].&[2012]
                },
                {
                  [Time Calculations].[Time Calculations].[Prior Year]
                }
              )
            )
          }
        )
      ),
      0,
      100
    )
  } DIMENSION PROPERTIES PARENT_UNIQUE_NAME, MEMBER_TYPE, MEMBER_VALUE ON ROWS
FROM [Cube]
WHERE CROSSJOIN(
        {
          [Begin Service Dt].[Calendar Hierarchy].[Calendar Year].&[2012]
        },
        {
          [Time Calculations].[Time Calculations].[Prior Year]
        }
      )

when I remove one of [Measures].[Claim % of Row], the query works. The MDX code for   [Measures].[Claim % of Row] is

IIF(
( [Measures].[Num of Claims],
Axis(1)(0)( Axis(1)(0).Count - 1 ).Dimension.CurrentMember.Parent) = 0,NULL,
[Measures].[Num of Claims] /
( [Measures].[Num of Claims], Axis(1)(0)( Axis(1)(0).Count - 1 ).Dimension.CurrentMember.Parent ))

Does anyone know what I am missing?

Thanks,

Femi


femi


Viewing all articles
Browse latest Browse all 14337


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>