title: Reduce multiple indirectly-specified fields using crossfilter
body: <p>I have a CSV dataset that I am exploiting with dc.js (crossfilter).</p>
  
  <p><code>
  Date, Country 1,Country 2,Country 3,Country 4,Country 5,Country 6,Target country (...)
  2014/12/11, USA, France, UAE, (...), Iraq
  </code></p>
  
  <p>The thing I am trying to do is to plot a row chart with <strong>one row per country.</strong>
  Here's my solution as of today:</p>
  
  <pre class="lang-js prettyprint-override"><code>  var countries = ndx.dimension(function(d) {
      var list = [];
      list.push(d["Country 1"]);
      if (d["Country 2"]) {list.push(d["Country 2"]);};
      if (d["Country 3"]) {list.push(d["Country 3"]);};
      if (d["Country 4"]) {list.push(d["Country 4"]);};
      if (d["Country 5"]) {list.push(d["Country 5"]);};
      if (d["Country 6"]) {list.push(d["Country 6"]);};
      return list;
    });
    var countriesGroup = countries.group().reduceSum(function(d) {
      return d.totalNumberOfStrikes;
    });;
     countryChart
      .width(400).height(500)
      .group(countriesGroup)
      .dimension(countries)
      .ordering(function(d){ return -d.value });
  </code></pre>
  
  <p>But, as you can see, it doesn't push <strong>uniques</strong> in the <em>list</em> array. Which causes stupid results, as each combination of countries in the CSV rows creates a new item in the list.</p>
  
  <p>What I want is to have a list containing each unique country, and then plot the thing in the row chart.</p>
  
  <p>Can you help?
  Thank you very much!</p>