I have an odd request to report data in PowerBI on days in the previous month that are part of a full Sunday-Saturday week.
For example, February 2023 would only show data from the 5th to the 25th: (https://i.stack.imgur.com/qldSK.png)
Days falling outside of those complete week cycles are to be omitted completely.
I have a datedim table with all the usuals, year/month/weeknum/weekbegindate/weekenddate/etc., but not sure how to go about putting this all together in PowerBI.
The data will be used in a matrix to show the average of instances occurring per day of the week for the previous month (example: total instances occurring on Sunday divided by the number of full Sun-Sat weeks in that month): (https://i.stack.imgur.com/xGeki.png)
Any help or direction would be greatly appreciated, I am stuck, stuck. Thanks!
What I've tried:
DaysOfWeek = COUNTX ( FILTER ( 'Date'; EARLIER ( 'Date'[YearWeek] ) = 'Date'[YearWeek] ); 'Date'[YearWeek] )
Afterwards I created my max-week logic (max week where DaysOfWeek = 7), however this method includes days rolling over from the previous month- which I want to exclude.