Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

ERROR: Function "SAMEPERIODLASTYEAR" expects a contiguous selection....

I am hoping someone can shed light on what is causing this error.  

 

1.  I have a date table.   

2.  My date table is connected (one to many) to my shipments table

3.  I do not have any bidirectional relationships

4.  I am not using direct query

 

The issue is that if I use a measure such as this (or anything with DATEADD), I get this same error.   Such a basic measure but if I try to add my Month (from the date table) I get this error  (for example in table visual)

 

Total Revenue LY = CALCULATE([Total Revenue],SAMEPERIODLASTYEAR( 'Date Table'[Date]))

 

 

4 Replies

  • Anonymous , Please make your relationship with the Date table Single directional. Because the error is for bidirectional relationships.

    Can share relationship details. Double click on the relation and a box will open.

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak    As I mentioned in my post, I do not have any bidirectional relationships.  I have no idea why the error that comes up says I do.   

       

       

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous ,Can you please share a sample pbix after removing sensitive data.