none
debugging formulae RRS feed

  • Question

  • Is it possible to review the evaluation of expressions used in a measure formula for a given cell?

     

    for example:

    ROUNDDOWN(IF(  MAX(YearTable[MembershipYear])-1>     (   year(TODAY()) -   MAX(Customer[JoinYear])  )                , BLANK(),  Transactions[Sum of Amount](DATESBETWEEN(YearTable[MembershipDate], BLANK(), LASTDATE(YearTable[MembershipDate])), ALL(YearTable))),0)

    could be displayed as:

    ROUNDDOWN(IF(  3> 2                , BLANK(),  Transactions[Sum of Amount](DATESBETWEEN(YearTable[MembershipDate], BLANK(), '2011-09-01'), ALL(YearTable))),0)

    how do you currently debug formulae?

    Friday, March 18, 2011 2:51 PM

Answers

  • Currently, the best way to debug a complex measure formula is to define temporary measures to examine each component of the large expression. For example, define tempoary measure m1 as MAX(YearTable[MembershipYear])-1 to see value 3 in the pivot table. This technique only works for scalar subexpressions but not for table subexpressions.
    • Marked as answer by d_ddd Sunday, March 20, 2011 8:05 PM
    Sunday, March 20, 2011 7:27 PM