The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Right now i have this formula:
= IF([Order placed] ="Yes",IF(DATEDIFF([Order ready],[Order in],DAY)<0,0,DATEDIFF([Order in],[Order ready],DAY)),DATEDIFF([Order in],TODAY()+[Leadtime based on Complexity & training],DAY))
This fomula works, but counts the weekends and i need a formula that exlude the weekends (so only workdays). I already created a column in my calender that says if a day is a workday or weekend. See the picture below. So what i need in this formula is the date diffance in days between order in and order ready without weekends.
I hope someone understand my problem so he/she can help me
@Anonymous , There are common wat to get work day, you can replace one date with today
new measure
Work Day = COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Min(Table[Start Date]),Max(Table[End Date])),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1))
new column
Work Day = COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Table[Start Date],Table[End Date]),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1))
refer my video on this - https://www.youtube.com/watch?v=Qv4wT8_P-AA
Hi @amitchandak
When i use this formula it says that "The start or end date in the Calendar function must not be empty". some of my rows in the start date are empty and i can't remove them out of the table, because it has important information. Is there a way using your formula without getting the this error message. Or a way to exclude those rows from the formula so i don't have to remove them?
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |