Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Having Trouble with YOY variance

I have sales data 1/1/2017 to 9/5/2018 in one table and a calendar table that is FY17-18. I have setup a PY, TY, Variance $ and Variance % measure. They show the right data when just looking at the figure but if i try to pull in month from the date table I get an error that my date table is not contiguous . Not sure why it is saying that.

 

 

Error Message:
MdxScript(Model) (3, 70) Calculation error in measure 'Sales Data'[PY Sales]: Function 'SAMEPERIODLASTYEAR' expects a contiguous selection when the date column comes from a table on the 1-side of a bi-directional relationship.

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Here is my date table (top of it) and it shows January 8th as the top row. Still has 730 items so everything is there.

     

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    Please try the month number like 1, 2, 3... rather than "January", "February"..., which might not be recognized as continuous dates. 

    Having_Trouble_with_YOY_variance

     

    Best Regards,

    Dale

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    Could you please mark the proper answers as solutions?

     

    Best Regards,

    Dale