I have figured out a solution as follows
Index.cshtml
<!--ko foreach: products-->
<h3 data-bind="text: $data"></h3>
<table class="productTable">
<thead>
<tr>
<th>Term</th>
<th>Location</th>
<th>Pipeline</th>
<th>Bid C/P</th>
<th>Bid Volume</th>
<th>Index</th>
<th>Bid</th>
<th>Offer</th>
<th>Offer Volume</th>
<th>Offer C/P</th>
</tr>
</thead>
<tbody data-bind="foreach: $root.subsetcanadiancrudes.index.Product()[$data]">
<tr>
<td data-bind="text: Term"></td>
<td data-bind="text: Location"></td>
<td data-bind="text: Pipeline"></td>
<td data-bind="text: BidCP"></td>
<td data-bind="text: BidVolume"></td>
<td data-bind="text: Index"></td>
<td data-bind="text: Bid"></td>
<td data-bind="text: Offer"></td>
<td data-bind="text: OfferVolume"></td>
<td data-bind="text: OfferCP"></td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Term</th>
<th>Location</th>
<th>Pipeline</th>
<th>Bid C/P</th>
<th>Bid Volume</th>
<th>Index</th>
<th>Bid</th>
<th>Offer</th>
<th>Offer Volume</th>
<th>Offer C/P</th>
</tr>
</tfoot>
</table>
<!--/ko-->
Knockout JS
ko.observableArray.fn.extendsdistinct = function (attrib) {var me = this;me.index = {};me.index[attrib] = ko.observable({});ko.computed(function () {var attribIndex = {};ko.utils.arrayForEach(me(), function (item) {var key = ko.utils.unwrapObservable(item[attrib]);if (key) {attribIndex[key] = attribIndex[key] || [];attribIndex[key].push(item);}});me.index[attrib](attribIndex);});return me;};
var CanadianCrudeViewModel = function (CanadianContext) {
var self = this;
self.canadiancrudes = ko.observableArray();
self.products = ko.observableArray();
self.datainput = ko.observableArray();
self.loading = ko.observable(true);
self.subsetcanadiancrudes = ko.observableArray(self.datainput()).extendsdistinct('Product');
self.products = ko.computed(function () {
var products = ko.utils.arrayMap(self.subsetcanadiancrudes(), function (item) {
return item.Product;
})
return ko.utils.arrayGetDistinctValues(products).sort();
});
viewModel.canadiancrudes.push(obsCanadianCrude);
viewModel.subsetcanadiancrudes.push(obsCanadianCrude);
viewModel.canadiancrudes.sort(function (left, right) { return left.Product() === right.Product() ? 0 : (left.Product() < right.Product() ? -1 : 1) });