I'm attempting to show two cumulative measures on a graph, however only one is showing correctly. The other is not counting up it's values correctly.
One measure is calculating the cumulative expected submissions.
The other is for the total actual submissions.
Within both of the cumulative measures I have played it safe and used the 'USERELATIONSHIP' function.
I have created an independent date table that covers the necessary date range. I have created two relationships between the date table and the table containing the expected & actual submissions. The main relationship is between the date table and the expected submissions. The second relationship is between the date and the actual submissions.
Data:
Expected Submission End of Week (Site) Actual Submission End of Week
24/05/2019 24/05/2019
07/06/2019
15/03/2019 15/03/2019
07/06/2019
21/06/2019
14/06/2019
19/04/2019 19/04/2019
07/06/2019
14/06/2019
14/06/2019
07/06/2019
28/06/2019
07/06/2019
24/05/2019 24/05/2019
21/06/2019
14/06/2019
07/06/2019
28/06/2019
28/06/2019
21/06/2019
24/05/2019 24/05/2019
21/06/2019
07/06/2019
19/04/2019 07/06/2019
17/05/2019 17/05/2019
15/03/2019 15/03/2019
Cumulative Actual O&M Submission =
CALCULATE (
COUNTA( 'O&M - Tracker'[Actual Submission End of Week]),
FILTER (
ALL('O&M - Tracker'),
'O&M - Tracker'[Actual Submission End of Week] <= MAX( 'O&M - Tracker'[Actual Submission End of Week])
),
USERELATIONSHIP(OMDATES2[Date],'O&M - Tracker'[Actual Submission End of Week])
)
Cumulative Expected O&M Submission =
CALCULATE (
COUNTA( 'O&M - Tracker'[Expected Submission (Site)]),
FILTER (
ALL('O&M - Tracker'),
'O&M - Tracker'[Expected Submission End of Week (Site)] <= MAX ( 'O&M - Tracker'[Expected Submission End of Week (Site)])
),
USERELATIONSHIP(OMDATES2[Date],'O&M - Tracker'[Expected Submission End of Week (Site)])
)
The issue I am having is that the cumulative measure of actual submissions doesn't plot correctly and it appears to be due to the relationship of date to actual submission not being the main relationship. (when I switch the relationship hierarchy, the other cumulative measure goes wrong).
Current results:
Cumulative Actual (incorrect) = 2 (15/03/2019), 7 (19/04/2019), 4 (17/05/2019), 7 (24/05/2019)
Cumulative Expected = 2, 4, 5, 8, 15, 19, 23, 26
Desired results:
Cumulative Actual = 2 (15/03/2019), 3 (19/04/2019), 4 (17/05/2019), 7 (24/05/2019), 8 (07/06/2019)
Cumulative Expected = 2, 4, 5, 8, 15, 19, 23, 26
If anyone can help explain where I am going wrong, it would greatly be appreciated.
Paul