locked
DAX error: End of input reached RRS feed

  • Question

  • When trying to use DAX to add a new claculated column to add a YEAR data column, I the following error:

     

    ============================
    Error Message:
    ============================
    
    The end of the input was reached.
    The calculated column 'demo[CalculatedColumn1]' contains a syntax error. Provide a valid formula.
    
    
    ============================
    Call Stack:
    ============================
    
      at Microsoft.AnalysisServices.Modeler.Storage.DataModelingSandbox.ExecuteCaptureLogAndProcessResults(OperationType type, Boolean cancellable, Boolean raw)
      at Microsoft.AnalysisServices.Modeler.Storage.DataModelingSandbox.ExecuteAMOCode(OperationType type, OperationCancellability cancellable, AMOCode code)
      at Microsoft.AnalysisServices.Modeler.Storage.DataModelingTable.Update(UpdateOptions updateOptions)
      at Microsoft.AnalysisServices.Modeler.Storage.DataModelingView.Update(UpdateOptions updateOptions)
      at Microsoft.AnalysisServices.Modeler.Storage.DataModelingView.ChangeFormulas(IList`1 colIndices, IList`1 names, IList`1 expressions)
      at Microsoft.AnalysisServices.Modeler.ClientWindow.ChangeFormula(TableWidgetPanel currentTable, IList`1 colIndices, IList`1 names, IList`1 expressions, Boolean doFormulaBarCommit)
    
    ============================


    If anyone can assist i would appreciate it.

    Thanks,

    NMSS!8

    Tuesday, June 28, 2011 4:39 PM

Answers

All replies

  • Can you paste the formula you are using? Seems to have a syntax error


    Javier Guillen
    http://www.msbicentral.com/Blogs/JavierGuillen.aspx
    Tuesday, June 28, 2011 6:25 PM
    Answerer
  • Javier,

    Thanks for replying. This is the formula I am using

    =YEAR(demo[Date]

    The name of my powerpivot sheet is demo. (full disclosure, I just installed power pivot and just purchased Bill Jelens book called powerPivot for teh data Analyst MS2010. This is demo data from his site).

     

    Thanks!

    Nathan

    

    Tuesday, June 28, 2011 6:46 PM
  • It seems is missing a parenthesis

    try

    =YEAR( demo[Date] )

    instead of

    =YEAR(demo[Date]




    Javier Guillen
    http://www.msbicentral.com/Blogs/JavierGuillen.aspx
    • Marked as answer by nmss18 Tuesday, June 28, 2011 7:23 PM
    Tuesday, June 28, 2011 6:49 PM
    Answerer
  • that workled! much appreciated.
    Tuesday, June 28, 2011 7:23 PM