View My Drafts
Hmm...If you start presenting new views or pages that don't requiring selecting either fiscal OR calendar dates, there is a risk you could be inviting a scenario where values were counted twice on the same day (since there are technically two dates every time). One way to keep this clean would be to make the relationship point to a query of your data instead of the original to segregate it (in DAX that would be a simple reference like "NewTableName = OriginalTableName").
I'd also consider putting those new tables in a query group folder so it doesn't get confused and accidentally used where it shouldn't.
Oops...yeah, that inherited my table renaming. Sorry about that. I think the new formula would just need the table name and a date clarification put back in:
SalesTotalPY =CALCULATE( [SalesTotal], SAMEPERIODLASTYEAR(Dates[Date].[Date]))
If I'm understanding the objective of your chart, a completely different approach could be to move the Sales Column to your Value, then use the new Dates table column of "Year" as a Legend field in your chart. Then you can choose which years you want to compare. Just a thought.Good Luck!
SalesTotalPY =Calculate( [SalesTotal], DATEADD(Dates[Date], -1, YEAR), FILTER( ALL(Dates), Dates[Year] <= MAX(Dates[Year]) ))
YearsTable = DISTINCT( UNION( VALUES(Dates[Year]), VALUES(Dates[FiscalYearNumber]) ))
New SalesTotal = IF( FIRSTNONBLANK(OptionSelector[Option], TRUE() ) = "Fiscal", CALCULATE( [SalesTotal], USERELATIONSHIP(Dates[FiscalYearNumber], 'YearsTable'[Year] ) ), [SalesTotal])New SalesTotalPY =IF( FIRSTNONBLANK(OptionSelector[Option], TRUE() ) = "Fiscal", CALCULATE( [SalesTotalPY], USERELATIONSHIP(Dates[FiscalYearNumber], 'YearsTable'[Year] ) ), [SalesTotalPY])