Forum Discussion
Previous Year Total With Non-Continuous Dates
- 4 years ago
See below.
Hi Anonymous
Try
"SAMEPERIODLASTYEAR expects a contigious selection when the date column comes from a table on the 1-side of a bi-directional relationship."
I've tried swapping the relationships from Calendar-> Sales, single.
Sales -> Calendar, single.
Sales <-> Calendar, both.
Same error each time.
- davehus4 years ago
Memorable Member
Are you passing the date from the fact table or the date from your date table into the measure. It should be the date table.
If the date table are the dates continuos as in 1st January to 31st December with no missing date values?
Contgious means in sequence.
- Anonymous4 years agoNot applicable
The dates in the chart are driven from the CalendarTable. I'm saying users are able to select non-continious dates from the chart (CalendarTable) and the rest of the measures on the dashboard aggregates based on what a user selects. If you select Janaury-2021 and April-2021, it aggregates the sales from those two years, that works flawlessly for multiple measures. The problem is getting the previous year aggregation when a user selects non-continious months, like January and April.
I don't want the previous year aggregation of sales BETWEEN January and April, I want the aggregated previous year sales of January and April.
- davehus4 years ago
Memorable Member
I understand that, however the potential reason that it is not working is that there is non continuos rows somewhere. See example from my dashboard that is using Sameperiodlastyear
example supplied.