Forum Discussion
Last 4 weeks data
Hey Narasimha,
First thing you want to do is make a new calculated column to hold the last day of every week:
Last Day of Week = Query[Date]+MOD(8-WEEKDAY(Query[Date],1),7)
Then, you can use the "Last Day of Week" (it is End Week2 in my dataset) column to create a filter on the chart. "End Date" in my data, should be the date you use in the formula above. This will show the last 4 weeks of the latest selected date in your slicer.
See below for the set up:
Hope this helps,
Alan
Hi alanhodgson
Your soloution matches my requirment, but it is not working for me. I have created caluculated coloumnas like you said
Last Day of Week2 = 'Datekey'[Date]+MOD(8-WEEKDAY('Datekey'[Date],1),7)
- alanhodgson9 years agoSolution Supplier
Hey Anonymous,
Make sure you are putting the Date field that you use for the calculated column into the "Axis" part of the visual.
Other than that, it looks correct to me. I was also able to recreate the same column again and it worked fine.
Hope this helps,
Alan