I am trying to show a line graph in power BI report for cumulative count of number of issues opened and resolved on each day. I have a table as below with the details of the list of issues.
If an issue is not yet resolved, the resolved date field is empty. I have created the below measures to get the cumulative counts.
# Get the total count of closed issues
total closed issues = COUNTROWS(FILTER(Issues,Issues[status] = "Closed" || Issues[status] = "Declined"))
#Get the total count of open issues
total issues = COUNTROWS(FILTER(Issues,Issues[status] <> "Closed" && Issues[status] <> "Declined"))
#Cumulative count of open issues
running total = CALCULATE([total issues],DATESINPERIOD(Issues[Created Date],MAX(Issues[Created Date]),-365,DAY))
#cumulative count of closed issues
running closed total = CALCULATE([total closed issues],DATESINPERIOD(Issues[Resolved Date],MAX(Issues[Resolved date]),-365,DAY))
But I see issues in the linegraph created, it is showing correct if graph is taken as created date vs running total and resolved date vs running closed total. But combination of those two is giving incorrect results especially the running closed total is not showing the cumulative count instead showing only the number of issues closed on each day. What am I missing here?