Recently, one of our clients asked for our advice about a problem that they were having.
Their Data Warehouse was set up correctly, beautifully in fact. They had a date table and a fact table which they were joining by a dateid (an integer). This is normally the correct way to do this and how it should be. However, it seems to upset Power BI, and when they were trying to use the SamePeriodLastYear function in a measure, the dashboard just showed blank data where last year’s data should be.
The solution – After much head scratching, this can be fixed by changing the link in the data warehouse so that the Date table and the Fact table are joined with the actual date column (not an integer dateid). Once that is done, the SamePeriodLastYear function will display the data correctly.