In the NReco examples there is a section on derived dimensions based on other dimensions. Is there a way to to a derived dimension based on a measure?
NReco derived dimension from another dimension example below
Define derived dimension expand hierarchy It is possible to define derived dimension (= calculated from existing dimension key or keys) in the following way:
var pvtData = new PivotData(new[]{ "creation_date", ... }, ... );
var byMonthCube = new SliceQuery(pvtData).Dimension("creation_date_month",
(dimKeys) => { // array of entry dimension keys
var creationDateValue = (DateTime)dimKeys[0]; // #0 - index of "creation_date" dimension
return creationDateValue.Month;
}
);
var byYearAndQuarter = new SliceQuery(pvtData).Dimension("creation_date_year_and_quarter",
(dimKeys) => {
var creationDateValue = (DateTime)dimKeys[0]; // #0 - index of "creation_date" dimension
return String.Format("{0} Q{1}",
creationDateValue.Year, GetQuarter(creationDateValue.Month) );
}
);