Forum Discussion
Dax Calculation Between Dates
Hi,
I tried to download your dummy test but there is only one column with dates (not 2) and the Excel sources are missing. So not easy to send you back an exemple with calculations.
Nevertheless, here are the steps to follow :
1/ Calcultate delay between your 2 dates, using a filter to count only working days (wk days = 1) in your date table.
2/ Write a measure to count the lines with a delay above 3. In this measure use a filter to count lines above 3 in delay, so something like :
Count of above 3 = CALCULATE( COUNT(Column to count) , delay>3 )
or >=3 depends on what you want.
You can use as well DISTINCTCOUNT if needed...
You also have, for working days, the NETWORKDAYS function, butif you alreday have a column in your date table...
Hope it helps
There are no excel sources and each table has a column with dates so I'm not sure which you're referring to. It's just a sort of replica of what I'm working with and all tables are built in PBI. There's a date table with the date, the order_filled table has the column for the date the order was filled and the order_placed table has a column for the date the order was placed, and the business_days table has the date and a column to indicated if it's a business day or not.
Where I get tripped up is how to write the dax measure to count the dates in the bussiness_days table where business_day = 1 based on the difference of order_filled.date - order_placed.date.