Background: To create a measure "LY Sales" that can be sliced by a range of TransactionDate
Problem Faced: It works when I sliced the data by individual day. However, when I chose the period 14/6/2017 to 15/6/2017, I got an error message "A table of multiple values was supplied where a single value was expected."
Based on your DAX expression, it seems that you need to calculated the value for same period for last year. If that is the case, you could use SAMEPERIODLASTYEAR function which returns a table that contains a column of dates shifted one year back in time from the dates in the specified dates column, in the current context.