Hi @Kamil ,
Welcome to the forum.
Instead of hard coding dates, add a WeekOffset to your Dates table to make comparing last week to the week before fully dynamic and a breeze.
There are several posts on this subject to be found on the forum, so use the search option to find other relevant content. Here are a few to get you started.
Hi Fiona,
Alternatively you could expand the Date dimension table with some Offsets, that way you can easily filter your Date table by current week, month, quarter or year because they will be equal to 0.
Here’s the M code to create these offsets. Please note that for the last line of your current code you’ll need to add a comma at the end and copy its name, followed by these lines where you’ll paste the name in place of YourPreviousStepName on the first line
InsertWeekOffset = Table.AddColu…
Hi John,
First, the number of measures really don’t matter in terms of size and performance because a measure only gets evaluated when used, so in my opinion this shouldn’t be a goal when developing a model.
There are many ways to achieve this by using just 2 measures depending on the evaluation context as illustrated below by the [Total Sales], [Sales % diff] and [Sales % diff v2] measures.
It all depends on what you want or need to show in your report visuals…
[first-%20lastQ%20diff%201…
I hope this is helpful
2 Likes