Hi. I am trying to compare some values with the previous week and previous month. I want to compare similar periods, so if the current week has only 3 days, it should compare with the first 3 days of the previous week. The same goes for the month.
I think your issue is that you are time shifting on an increasing granularity. So if I said, today is 2 April, what month is it now, what are the sales this month, and what were the sales last month - you might say - this month is April, our sales this month are X, and the sales last month (for March) were yada yada. If today is 30th April and I asked the same question, the answer for last month would be the same but the answer for April would be different. So are you wanting to compare month to date this month with month to date last month?
* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I am assuming you have a date table containing all the dates and it is linked to the SalesFact Table.
Also your date table has dates upto the lastdate of the SalesDate and not beyond. I am copying below the steps that I learnt from one of the links on time intelligence patterns from internet. I do not have the link to share.
I have a Calendar table with all the dates connecting everything.
Regarding giving you the data, sorry for my ignorance, but is ther any expedite way to send you the file with data from 2 or 3 months, for example? Currently I don't know how to do this without sending all the data from the backgroung.