Hello,
I am trying to count a field based on a date. So I have a SQL database which holds data, in that data we have a status field. We are trying to use a calculated value to count the instance of the data depending if the create date matches a selected date and if two instances of the field match. Here is what I have so far:
count(@CurrentIncidentStatusId[(@CreateDate = MonDate) and (. = "OPEN" or . = "REFR")])
count(xdXDocument:GetDOM("SQL Status Data Source")/dfs:myFields/dfs:dataFields/d:Incident/@CurrentIncidentStatusId[(../@CreateDate = xdXDocument:get-DOM()/my:MAIN/my:VisualData/my:VisualDataDates/my:DayDates/my:MonDate) and (. = "OPEN" or . = "REFR")])
I will break it down, so the CurrentIncidentStatusID can be 1 of 7 options, but only want it to check if OPEN or REFR. The CreateDate is when the incident was created, and the MonDate is a date picker selected to query against the CreateDate.
Works find if I take out the date validation, but need it so it counts for that date selected.
Any ideas?
Thanks