Forum Discussion
Rog_2901
2 years agoFrequent Visitor
Counts rows between dates
Hi, I have a function created in Excel: (=COUNTIFS(INCIDENTS[sys_created_on], "<="&[@Date], INCIDENTS[NEW resolved], ">="&[@Date], INCIDENTS[sys_created_on], "<"&[@[Date-10]], INCIDENTS[sys_created_...
Anonymous
2 years agoNot applicable
Hi Rog_2901 ,
Maybe you can try this DAX:
11-20 days TEST =
VAR _start = MAXX(ALL('Incidents'), 'Incidents'[week_start])
VAR _start-20 = MAXX(ALL('Incidents'), 'Incidents'[week_start-20])
VAR _start-10 = MAXX(ALL('Incidents'), 'Incidents'[week_start-10])
RETURN
COUNTROWS(
FILTER(ALL('Incidents',
'Incidents'[sys_created_on] <= _start &&
'Incidents'[New_resolved_date] >= _start &&
'Incidents'[sys_created_on] >= _start-20 &&
'Incidents'[sys_created_on] < _start-10
))
If this DAX doesn't work:
Can you provide some sample data? Without sample data it's hard for me to know what your problem is. Also, could you please provide us with the incorrect result you got and the correct result you would like to get?
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.