Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MojoGene
Post Patron
Post Patron

SAMERPERIODLASTYEAR - Non Contiguous Date Selection Error

I've read multiple posts on this error: "SAMEPERIODLASTYEAR expects a contiguous selection when the date column comes from a table on the 1-side of a bidirectional relationship." I am still baffled by my error.

 

I have a simple measure for calculating fees billed:

Fees Billed = CALCULATE(SUM(FactTable[AmtBilledForSubtype]),FactTable[BillSubtype]="FEE")

I have another measure for YTD Fees:

Fees Billed YTD = TOTALYTD([Fees Billed],Table_BasicCalendarUS[DateKey])

No problems with either of these measures.

 

Now I want Fees Billed for the same period last year. Here is the troublesome measure:

Fees Billed SPLY = CALCULATE([Fees Billed YTD],SAMEPERIODLASTYEAR(Table_BasicCalendarUS[DateKey]))

 

The error message suggests that there is a bi-directional relationship at the heart of the problem, but 

in my date table, the DateKey column has a one-to-many, single cross-filter relationship to the DateBilled colum in the FactTable.

 

Any suggestions?

1 ACCEPTED SOLUTION

I get the same exact error message. 

View solution in original post

16 REPLIES 16

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.