Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I'm trying to find the time in days between two dates (Start date & End Date) as some fields can be blanks, I'm using the following measure:
@Anonymous
Can you try the following measure?
Analysis Time (bussiness days) =
var __start = MAX(Data[Start Date])
var __end = MAX(Data[End Date])
return
IF(
__start=BLANK() || __end=BLANK(),BLANK(),
COUNTROWS(
FILTER(
CALENDAR(__start,__end),
WEEKDAY([Date],1) < 6
)
)
)
Can you share some sample data and the expected result to have a clear understanding of your question?
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?
_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous , I tried same formula (as a new column) on my file having enddate null and it worked
Business days = SWITCH(TRUE(), NOT(ISBLANK(Employee[Start Date])) && NOT(ISBLANK(Employee[End Date])) , COUNTROWS(FILTER(
ADDCOLUMNS(CALENDAR([Start Date],[End Date]),"Weekday",WEEKDAY([Date])),[Weekday]
<6)))
@amitchandak I'm using Start dat calculated column as :
@Anonymous , Are these columns of measures. Hope they are columns.
Is this column a date [New Value Start]?
Also do not use ".Date", unless the column has timestamp
@Anonymous , it should be
not(isblank(Issues[Start Date])) && not(isblank(Issues[End Date])) ,
Then take a diff
for working diff refer to my file
or 2nd page of this file
https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0
Or refer this blog
https://curbal.com/blog/glossary/networkdays-dax
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |