Forum Discussion
rkgundabhat
2 years agoHelper I
Filter data
Hello , My table has these columns CaseNumber ,Department, CaseOpenedDate, CaseTerminatedDate, CaseCloseDate. I want to know cases which were open in a given month. My example query for the cases w...
- 2 years ago
rkgundabhat
Please try this measure:Open Cases = CALCULATE( COUNTROWS('CaseTable'), FILTER( 'CaseTable', 'CaseTable'[CaseOpenedDate] <= MAX('Dates'[Date]) && ( 'CaseTable'[CaseTerminatedDate] = BLANK() || 'CaseTable'[CaseTerminatedDate] >= MIN('Dates'[Date]) ) && ( 'CaseTable'[CaseCloseDate] = BLANK() || 'CaseTable'[CaseCloseDate] >= MIN('Dates'[Date]) ) ) )
Fowmy
2 years agoSuper User
rkgundabhat
Please try this measure:
Open Cases =
CALCULATE(
COUNTROWS('CaseTable'),
FILTER(
'CaseTable',
'CaseTable'[CaseOpenedDate] <= MAX('Dates'[Date]) &&
(
'CaseTable'[CaseTerminatedDate] = BLANK() ||
'CaseTable'[CaseTerminatedDate] >= MIN('Dates'[Date])
) &&
(
'CaseTable'[CaseCloseDate] = BLANK() ||
'CaseTable'[CaseCloseDate] >= MIN('Dates'[Date])
)
)
)
rkgundabhat
2 years agoHelper I
I think from the above DAX code , I only have CaseTable. What is the Dates table and the Date column?