Display stacked bar chart using multiple records from one field as data series
I am trying to make a stacked bar chart that displays subsets of one field as successive x-axis data series. As can be seen in the screenshot below, I am trying to display records from the underlying table that is sorted by Grant ID.
Each Grant ID should then have 8 series. The first series would correspond to the second entry of the column "Difference" (in days) for each Grant ID. The second series would correspond to the third entry of the column "Difference" for each grant, with each count restarting with a new Grant ID.
Unfortunately, using the GetNthRecord only returns the second, third, etc. records from the entire set without restarting with each grant.
I may be making a mistake in the overall data structure. Before, I had tried using multiple columns for the differences but that amounted to using fields for an unknown number of transactions. And, as I learned, one must not use fields instead of rows when the number of them is not quite clear, e.g. making a new field for each purchase etc.
So, I would greatly appreciate your help in displaying a that lists the values of "Difference" for each grant as a stacked bar graph. The rationale behind this is displaying the number of days between each relevant transaction.
I would greatly appreciate your help.