Forum Discussion
SAMEPERIODLASTYEAR & Cumulative Total
Hi,
Couple of things I want to ask relating to SAMEPERIODLASTYEAR
My measure...
Its showing months in the future because, although you don't have any sales yet this year, you did have sales for those dates last year. Easiest way to fix that is to add a column to your date table, something like
Today or before = 'Date'[Date] <= TODAY()and then filter your visual to show only when that is true.
The problem with your table visual showing the values for the full year is happening because there is no filter on the date table - it will take the last date in your date table to work from, which is presumably 31st December 2022. You can either use the column generated above as a filter, again set to true, or use a relative date filter to show values in the last 0 or 1 calendar days, including today. That will give the values from Jan 1 to today last year. I think this will show what you are after for your second questions as well.
2 Replies
- johnt75
Super User
Its showing months in the future because, although you don't have any sales yet this year, you did have sales for those dates last year. Easiest way to fix that is to add a column to your date table, something like
Today or before = 'Date'[Date] <= TODAY()and then filter your visual to show only when that is true.
The problem with your table visual showing the values for the full year is happening because there is no filter on the date table - it will take the last date in your date table to work from, which is presumably 31st December 2022. You can either use the column generated above as a filter, again set to true, or use a relative date filter to show values in the last 0 or 1 calendar days, including today. That will give the values from Jan 1 to today last year. I think this will show what you are after for your second questions as well.