Forum Discussion
kyleldi
9 years agoFrequent Visitor
NETWORKDAYS type function in PowerBI
I have a table (vw_WorkCenterUtilization) and a date column (Work_Date) that I need to calculate the oldest and newest date in the data, and the number of work days within it. I'm using the FIRSTDAT...
- Anonymous9 years ago
Hi kyleldi,
Firstly, create a calendar table in Power BI Desktop following the guide in this blog. Then create a column in the calendar table using the Dax below.is work day = SWITCH(WEEKDAY([Date]),1,0,7,0,1)
Secondly, create a measure using the following DAX and create a card visual.
Days= CALCULATE(SUM('Date'[is work day]), DATESBETWEEN('Date'[Date], [OldestDate], [NewestDate] ))Thanks,
Lydia Zhang
AlexanderPrime
Solution Supplier
4 years agoThey also just added NETWORKDAYS in DAX this month.
Stephen_Sink
4 years agoFrequent Visitor
Do I have to update my version of desktop to get this? im running 2.105