Facets for CubeGrid

I have the following data -

category, subCategory, count

c1,sc1,1
c1,sc2,2
c2,sc3,1
c3,sc4,5
c3,sc5,4
c3,sc6,9
c3,sc7,0

So for c1 - there is fixed sub category sc1 and sc2
for c2 - sc3
for c3 - sc4,sc5,sc6,sc7
and the value property is the count.

cubeGrid.setFacets(new Facet(“category”), new Facet(“subCategory”), new Facet(“count”));
cubeGrid.setRowFacets(“category”, “subCategory”);
cubeGrid.setValueProperty(“count”);

now this one does not work - gives me
“Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): this.rowFields[i][0] is undefined” in the development console,
please anyone suggest the right way.