count the number of days without Friday and Saturday

Hello guys,

I have a date column

I want to count the number of days without Friday and Saturday

from the [date] to TODAY()

 

thanks

0 8 209
8 REPLIES 8

Normally you'd just use WORKDAY().  But since you want to exclude friday and also not sunday I think you're going to have to create an IFS() formula where each line does the following:

  • If today is Monday
  • Calculate the number of whole weeks between [date] and TODAY().  Multiply this by 5
  • Assuming the duration is >= 4 days add 4 to account for Mon-Thurs
  • Finally add on the number if Mon-Thurs days that are after whole weeks

There is no easy, simple formula for this one

Simon, 1minManager.com

thanks Simon

Can you write the formula

COUNT(
SELECT(
TableName[DateColumn],
AND(
[DateColumn] >= "your_specific_date",
[DateColumn] <= TODAY(),
WEEKDAY([DateColumn]) <> 6, 
WEEKDAY([DateColumn]) <> 7  Fridays
)
)
)

Replace "TableName" with the actual name of your table, and "DateColumn" with the name of the column that contains the dates you want to consider. Make sure to replace "your_specific_date" with the date from which you want to start counting.

That (sortof) works to count rows.  But he's asking for a formula that counts days from a single fixed date to Today().


@salehaljoei wrote:

Can you write the formula


Yes @salehaljoei , but there are so many items that it needs to account for it would take me about an hour or more.  E.g.

  • [Date] > TODAY()
  • [Date] = TODAY()
  • Duration is 1 day and its a Fri or Sat
  • Duration is 1 day and its not a Fri or Sat
  • Duration is > 1 day but less than a week and includes Fri and/or Sat
  • Duration is > 1 day but less than a week and doesn't include Fri and/or Sat
  • Duration is > 1 week and starts on Fri or Sat
  • Duration is > 1 week and end on Fri or Sat
  • Duration is > 1 week and doesn't start or end on Fri or Sat

These are just some that spring to mind...

 

ok 

thanks Simon

thanks  Sirfyaad

 

 

@salehaljoei Try This,

COUNT(
  FILTER(
    YourTable[DateColumn],
    AND(
      WEEKDAY([DateColumn]) <> 6,
      WEEKDAY([DateColumn]) <> 7
    )
  )
)

This expression filters the dates in the specified column by excluding those with a weekday value of 6 (Friday) or 7 (Saturday). It then counts the remaining dates.

not working

"Function 'FILTER' should have exactly two parameters, a table name and a filter condition"

Top Labels in this Space