Forum Discussion
Consecutive Week End Dates
Anonymous , Create a date tbale with these new columns
new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week end date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
measures for next 4 weeks
next 4 weeks = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]>=max('Date'[Week Rank])+1 && 'Date'[Week Rank]<=max('Date'[Week Rank]) +5))
Great thanks for your prompt response.. But how it will determine whether the selected date is if current month and the running week, as per this it should show me the next weekend dates data only.. But sure I will try this one.. So it's basically for next four weeks only.. Not the weekend dates..
- Anonymous5 years agoNot applicable
Anonymous you can add a [Week End Date] column to your DIM_DATE table. The [Week End Date] will contain the week end date corresponding to this particular date. This way, no matter what date is selected, you can always read the [Week End Date] of that date.
- Anonymous5 years agoNot applicable
Its already there but i need to find the next week end date based on the selection of any dates, lets say if select 18th May then its weekend date is 23, so basically the output should be 30th May 2021.. that is how it should work, if i choose 2nd May then it should show me the next week end dates such as 9th, 16th 23 and 30 May 2021. This is what i am trying to achive.