I’m struggling with a problem that seems a little more tricky than initially thought.
My customer publishes articles on a regular basis. Their customers can login to a portal and download these published articles, with all downloads recorded in a table.
The calculation I’m trying to produce should be able to evaluate 2 articles at a time (the one being evaluated and the previous one) and work out whether the contact download the first AND the second of the two evaluated articles. If this is true, this should count as 1.
I have produce the figure required below – however with only a single contact highlighted at a time. I need to aggregate the required expression across all contacts which I have struggled to do. To be clear, if another contact had dowloaded Stories 1 & 2, I would expect to see 2 on the Story 2 record to show that 2 contacts had downloaded Stories 1 & 2.
Contact
Article
DownloadCount
The required value I want is
Explanation
Haider
Story 1
1
0
First Article - nothing to compare against prior
Haider
Story 2
1
1
User download Story 1 And Story 2 - this needs to be counted
Haider
Story 3
1
1
User download Story 2 And Story 3 - this needs to be counted
Haider
Story 4
0
0
User download Story 3 But Not 4 - this needs to be ignored
Haider
Story 5
1
0
User download Story 5 But Not 4 - this needs to be ignored
Haider
Story 6
1
1
User downloaded Story 5 And Story 6 - this needs to be counted
To make things a little more tricky, I need to the table to always show all articles, even if one has 0 downloads.