Is it possible to create a calculated field based off other calculated field?

Amy Jandreau 61 Reputation points

Hi All,
I am creating MTD, Connecting to SSAS using the Import mode.

SUM(MTD([Dates].[Calendar].CurrentMember), [Measures].[Transaction Count])

Here the [Measures].[Transaction Count] is a calculated field (sum of 4 other measures). I tried creating the calculated field and I just get an error "syntax error at MTD".
Please advice what is wrong with the syntax, I do not see any issue with the syntax, i looked up online and other sites and it is the same. Thanks in advance.

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,243 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alexei Stoyanovsky 3,411 Reputation points

    Yes, chaining MDX calculations is absolutely possible. In fact, it is virtually unavoidable for any but the most basic scripts.
    Note that Transaction Count in your formula does not affect the MTD call which errs out.
    Your MTD syntax will break for any cell where the current member is not a day. If will also not work if you haven't marked the Month attribute in the Dates dimension.
    However, I do not recognize the wording of the error message you quoted. What system generated the message, and is it its exact wording?

    0 comments No comments