Forum Discussion
SAMERPERIODLASTYEAR - Non Contiguous Date Selection Error
- 9 years ago
I get the same exact error message.
Ok, I'm thinking it's something to do with the fact that your Fees Billed measure is filtering by BillSubType. So what's happening is that it's coming up with blanks for some of the past year's dates when it's trying to calculate the Fees Billed and it doesn't like it.
For the heck of it, can you try adding +0 to your Fees Billed formula:
Fees Billed = CALCULATE(SUM(FactTable[AmtBilledForSubtype])+0,FactTable[BillSubtype]="FEE")
I know this won't fix the issue necessarily, but it would confirm what's going on.
I tried the suggestion, but it had no apparent effect on any of the 3 measures.
- bblais9 years agoResolver III
Are you using any filters or slicers on the date in your report? If so, make sure they are not using the date column out of the fact table, but instead the date column out of the date table.
- MojoGene9 years agoPost Patron
I was slicing the data on the page so that the DateBilled year included only the last 3 years, but one of the first things that occurred to me was to remove this slicer. Removing it had no effect on the error.
- bblais9 years agoResolver III
How about this instead of using SAMEPERIODLASTYEAR:
Fees Billed SPLY = CALCULATE([Fees Billed YTD],DATEADD(Table_BasicCalendarUS[DateKey],-1,YEAR))