Currently, I am facing an issue in a date difference calculation. I need your suggestions on how I can solve this issue. I need to count rows if the value exists between my date slicer range. In the screenshot provided:
I am using Dax Formula as below:
SNF Admitted = COALESCE( CALCULATE( COUNTROWS('Patient Tracking'), FILTER( 'Patient Tracking', 'Patient Tracking'[Date of Admission- SNF (If Applicable)] >= [MinSelectedDate] && 'Patient Tracking'[Date of Admission- SNF (If Applicable)] <= [MaxSelectedDate] ) ), 0 )
i got solution for my issue. basically there were not need to use slicer range manually in DAX. I have use below code and got solution.
COUNTROWS( FILTER( 'Patient Tracking', 'Patient Tracking'[Date of Admission- SNF (If Applicable)] >= MIN('Table'[Date]) && 'Patient Tracking'[Date of Admission- SNF (If Applicable)] <= MAX('Table'[Date]) ) )
in above code "'Patient Tracking'[Date of Admission- SNF (If Applicable)]" data date column to whom i was calculating and "'Table'[Date]" is my Period or Date table