Forum Discussion
Anonymous
3 years agoNot applicable
DAX - Count Days Between two date fields on a Date Axis
Hello, I'm trying to use DAX to count every day between two date fields for a large dataset and create a stacked column chart broken out by Program. You can do this in excel by means of the COUN...
- 3 years ago
Hi,
hope this will help you. Dynamic measure based on your calendar.
Count Correct Rows =var date_ref = SELECTEDVALUE(dim_calendar[Date])returnCOUNTX(FILTER('Sample';AND('Sample'[Status Start Date] <= date_ref;'Sample'[Status End Date]>=date_ref));COUNTROWS('Sample'))You can use Program column as you want. No relationship needed.
bolfri
3 years agoSolution Sage
Hi,
hope this will help you. Dynamic measure based on your calendar.
Count Correct Rows =
var date_ref = SELECTEDVALUE(dim_calendar[Date])
return
COUNTX(
FILTER('Sample';AND('Sample'[Status Start Date] <= date_ref;'Sample'[Status End Date]>=date_ref));
COUNTROWS('Sample')
)
You can use Program column as you want. No relationship needed.