Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
How to add measures
posted

Hello

I have the following data structure:

Class1 has following properties: string1, string2, doule1, double2, class2.

Class2 has the following properties: string3, string4, double3, double4.

I create a FlatDataSource with the initial cube containing a List<Class1>. What I want, is to be able to expose double3 and double4 from class2 property of Class1 as measures. How can I do that??

FlatDataSource flatDataSource = new FlatDataSource()
            {
                ItemsSource = class1List,
                Cube = DataSourceBase.GenerateInitialCube("Class1"),
                Rows = DataSourceBase.GenerateInitialItems("[string1], [string2]"),
                Columns = DataSourceBase.GenerateInitialItems("[class2]"),
                Measures = DataSourceBase.GenerateInitialItems("double3")
            };

does not work. What am I doing wrong?

Many thanks

Kostas.