Forum Discussion

KVPro's avatar
KVPro
Frequent Visitor
4 years ago
Solved

Workday in month as calculated column

Hi

I have data as here:

DateDayNameExpected Workday
01.04.2022Friday1
02.04.2022Saturday1
03.04.2022Sunday1
04.04.2022Monday2
05.04.2022Tuesday3
06.04.2022Wednesday4
07.04.2022Thursday5
08.04.2022Friday6
09.04.2022Saturday6
10.04.2022Sunday6

 

How to calculate workday as above? It must be calculatef column for each months based on date. Saturday and Sunday doesn't working days, so I want to get earlier value (for Friday).

 

Please help me

  • Add a new column to your date table, Is Working Day, which returns 1 for Monday-Friday then you can add a new column to your table like

    Working day in month =
    CALCULATE( SUM('Date'[Is working day]), DATESMTD('Date'[Date]) )

3 Replies

  • Add a new column to your date table, Is Working Day, which returns 1 for Monday-Friday then you can add a new column to your table like

    Working day in month =
    CALCULATE( SUM('Date'[Is working day]), DATESMTD('Date'[Date]) )
    • KVPro's avatar
      KVPro
      Frequent Visitor

      OMGGG, I really really thank you. I've been struggling with this for almost a week

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    KVPro 
    You can create the calulated Column

    Day = WEEKDAY('Calendar'[Date],2)  -- Day start from monday and end on sunday
    and while calculating apply filter day < 6
    I think this will work. Pls ask if you need any help