I am having difficulties in representing only last week’s data in a visual.
So, I have an excel sheet where we get information of the defected orders with a date column against it.
I have calculated total number of defective orders for the last week, however when i represent it on a graph it shows the entire data and not just last week’s data.
Is there a way I can code in DAX that my visual only shows the last week data and not the entire data on a visual. EnterpriseDna Query.pbix (92.3 KB)
Take a look at @Melissa’s absolutely awesome calendar table
With this table, you can build in logic to filter your data by the week offset value.
Ex: Current week would be offset #0, and prior week would be offset # -1
a couple of other notes - which may not be needed, as this is just a sample:
Always mark your date table as a date table (right-click on the table name in the model to do this)
I suggest hiding your connection fields (like date on the Sheet 1 table) - this will prevent you from accidentally using those in a visual and messing up your filter logic.