Forum Discussion
Count Weekends
- 4 years ago
Hi, gauravnarchal
You can try the following methods.
_weekendcountasoftoday = CALCULATE ( COUNTROWS ( 'Calendar' ), FILTER ( ALL ( 'Calendar' ), [WeekdayWeekend] = "Weekend" && [Date] <= TODAY () && [Monthyear] = SELECTEDVALUE ( 'Calendar'[Monthyear] ) ) )The day I replied to you is April 5, and the weekend count should be 2.
When I replace today with April 2nd as you asked, I get the result you were expecting before with the number 1.
This should be your desired outcome.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
maybe try
CALCULATE(
COUNTROWS('Calendar'), all('Calendar'), 'Calendar'[WeekdayWeekend] = "Weekend" && ‘Calendar'[Date]<=today() )
Hi ryan_mayu - I am not getting the result using this measure. When I select the month April’22 in the slicer, I am getting the result as 861 which is YTD instead of 1 as this month (April 22) today is the first weekend.