why olapdatagrid always show only one olapmeasure?

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default why olapdatagrid always show only one olapmeasure?

    I have defined two olapmeasures in olapcube,
    but the olapdatagrid always shows the first defined olapmeasure,and the second measure don't show.
    anyone has a solution?
    thanks
    geroge77 Guest

  2. Similar Questions and Discussions

    1. How to resize the width of row Header in OlapDataGrid
      First question : I would like to resize the rows Header of my OlapDataGrid, how can I do ? Second question : I have an OlapDataGrid included in...
    2. Display of an olapDataGrid, formatter
      Is it possible to send a formatter ? In fact I would like to apply a formatter after the value is analysed. I tried something but it doesn't work,...
    3. php show if
      hi, i was looking for a FREE extension that basically was something that would show one thing if the user was logged in and show another if the user...
    4. need someone to show me the right way
      I really don't know how to make this just the way I want to be. I wish I could show you the picture what I want. Maybe if I give you an URL:...
    5. Do not show if + SQL
      I have two rows in my database, one is Sold = Y or N and the other is Sold date. I would like for an item not to show if SOLD = 'Y' and SOLDDATE >...
  3. #2

    Default Re: why olapdatagrid always show only one olapmeasure?

    no answer?
    geroge77 Guest

  4. #3

    Default Re: why olapdatagrid always show only one olapmeasure?

    On 16 Apr, 02:28, "geroge77" <webforumsu...@macromedia.com> wrote:
    > no answer?
    Same question here..
    Cosma Guest

  5. #4

    Default Re: why olapdatagrid always show only one olapmeasure?

    How do you define your ColAxis ?

    Get the source from this sample :
    [url]http://flexpearls.blogspot.com/2008/04/custom-aggregator-sample-for-flex-olap.html[/url]

    In this sample there are two different measures.
    sylvain.postolec@gmail.com Guest

  6. #5

    Default Re: why olapdatagrid always show only one olapmeasure?

    How do you define your ColAxis ?

    Get the source from this sample :
    [url]http://flexpearls.blogspot.com/2008/04/custom-aggregator-sample-for-flex-olap.html[/url]

    In this sample there are two different measures.
    sylvain.postolec@gmail.com Guest

  7. #6

    Default Re: why olapdatagrid always show only one olapmeasure?

    The first measure is by default included in the query results.

    If you want to display multiple measures you need to include the required
    measures either in the column axis or the row axis of the query.

    Sreenivas R Guest

  8. #7

    Default Re: why olapdatagrid always show only one olapmeasure?

    Try creating a separate OLAPSet for metrics

    var metricSet:OLAPSet= new OLAPSet;
    metricSet.addElement(cube.findDimension("Measures" ).findMember("Revenue"));
    metricSet.addElement(cube.findDimension("Measures" ).findMember("Cost"));

    add metricSet as crossjoin to the column query axis:

    var colQueryAxis:IOLAPQueryAxis = query.getAxis(OLAPQuery.COLUMN_AXIS);
    colQueryAxis.addSet(customerSet.crossJoin(metricSe t));

    Here, customerSet is
    var customerSet:OLAPSet = new OLAPSet;
    customerSet.addElements(cube.findDimension("Custom erDim").findAttribute("Customer").children);



    OLAPCube itself looks like this

    <mx:OLAPCube name="FlatSchemaCube"
    dataProvider="{flatData}"
    id="myMXMLCube"
    complete="runQuery(event);">

    <mx:OLAPDimension name="CustomerDim">
    <mx:OLAPAttribute name="Customer" dataField="customer"/>
    <mx:OLAPHierarchy name="CustomerHier" hasAll="true">
    <mx:OLAPLevel attributeName="Customer"/>
    </mx:OLAPHierarchy>
    </mx:OLAPDimension>

    <mx:OLAPDimension name="ProductDim">
    <mx:OLAPAttribute name="Product" dataField="product"/>
    <mx:OLAPHierarchy name="ProductHier" hasAll="true">
    <mx:OLAPLevel attributeName="Product"/>
    </mx:OLAPHierarchy>
    </mx:OLAPDimension>

    <mx:OLAPDimension name="QuarterDim">
    <mx:OLAPAttribute name="Quarter" dataField="quarter"/>
    <mx:OLAPHierarchy name="QuarterHier" hasAll="true">
    <mx:OLAPLevel attributeName="Quarter"/>
    </mx:OLAPHierarchy>
    </mx:OLAPDimension>

    <mx:OLAPDimension name="ZIPCodeDim">
    <mx:OLAPAttribute name="ZIPCode" dataField="zip"/>
    <mx:OLAPHierarchy name="ZIPCodeHier" hasAll="true">
    <mx:OLAPLevel attributeName="ZIPCode"/>
    </mx:OLAPHierarchy>
    </mx:OLAPDimension>

    <mx:OLAPMeasure name="Revenue"
    dataField="revenue"
    aggregator="SUM"/>
    <mx:OLAPMeasure name="Cost"
    dataField="cost"
    aggregator="SUM"/>
    </mx:OLAPCube>
    RJRoman Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139