I have a table that displays customers, samples, sample received date and testing complete date. I need to calculate the number of working days (based on a Monday - Friday workweek) that the samples were in test. The below DAX works great for this.
And Matrix image is attached as Measure 1:
However, my condition is that if there is no testing complete date and the samples are still in test then there is a running count of working days.
Thus,


Hi Deena,
Can you upload a sample file with test data? It will be much easier to work on a sample than on imaginary data.
You can take a look at this article, to see how you can handle data using variables.
Attached is a sample file. Thank you.
(Attachment removed, contained personal data. CB)
Hi Deena,
Add 2 columns to Sample table, with the following formula:
Status Desc=RELATED('Status'[Status])
Name=RELATED(Contact[Customer Name])
Use the new fields Status Desc and Name instead of those from the related tables.
Perfect, thank you.