1 Reply Latest reply: Sep 14, 2010 9:26 AM by Magv RSS

    SOLVED: Possible to display one line in chart for each selected value of a particular field

    Göran Sander

      SOLVED: Turned out it was just as easy as I thought it would be..
      The strange aggregation behavior was caused by a couple of expressions that were set as invisible rather than disabled. Disabling them made the graph work just as expected.


      I'm trying to create a line chart with some specific properties:

      - It should only display if at least one, but no more than eight (or ten, or whatever) values are selected in the list box showing values for the "Country" field). This can be done with a calculation condition, no problem there.

      - Depending on what countries I select in the "Country" list box, lines for those countries should be displayed in the chart. I.e. if I select "Germany" and "France" but not "Japan", only lines for the first two should be visible in the chart.

      - "Age" should be on the x axis, number of entries for each age on the y axis, with one line for each selected country (need to sum over all selected dates, thus).


      Might be missing something obvious here... But I only get one line in the chart, with the sum of the two selected countries' values.

      I am using Age and Country as dimensions, and count(Age) / count(total <Country> Age) as the one and only expression.
      If I add more expressions and hard code these to show information for specific countries that works, but isn't very flexible. By adding Country as a second dimension I expected it to show up as separate lines in the chart (just like it does in the pivot table I switch to from the line chart), but no luck.


      Any suggestions?




      The data itself is date coded:
      <date> <country> <Age>

      For example:

      2010-08-01, France, 25
      2010-08-01, France, 35
      2010-08-01, France, 25
      2010-08-01, Japan, 65
      2010-08-01, Japan, 65
      2010-08-01, Japan, 35
      2010-08-01, Japan, 65
      2010-08-01, Germany, 55
      2010-08-01, Germany, 55
      2010-08-01, Germany, 40

      2010-08-02, France, 25
      2010-08-02, France, 40
      2010-08-02, France, 55
      2010-08-02, Japan, 65
      2010-08-02, Japan, 32
      2010-08-02, Japan, 55
      2010-08-02, Germany, 40
      2010-08-02, Germany, 20
      2010-08-02, Germany, 25