Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
KVPro
Frequent Visitor

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

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

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]) )

View solution in original post

3 REPLIES 3
Surya9
Resolver III
Resolver III

@KVPro 
You can create the calulated Column

Surya9_0-1648652095805.png

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
 

 

johnt75
Super User
Super User

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
Frequent Visitor

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

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.