← proof sheet

06 pivot-category-channel-metrics

pivot

PR #153 9fdf8d3718

Channelinkpaperstaplestoner
RevenueUnitsRevenueUnitsRevenueUnitsRevenueUnits
Web$84,495.312,690$33,635.282,670$11,655.152,777$147,490.462,529
Store$39,006.261,246$18,224.471,461$5,982.041,424$79,913.841,386
Phone$18,519.59594$9,444.82746$2,852.26681$37,218.94634
Viz
{
  "mark": "text",
  "x": [
    {
      "kind": "dimension",
      "ref": {
        "dimension": "category"
      }
    },
    {
      "kind": "metrics"
    }
  ],
  "y": [
    {
      "kind": "dimension",
      "ref": {
        "dimension": "channel"
      }
    }
  ],
  "text": {
    "kind": "metrics",
    "of": [
      {
        "kind": "metric",
        "metric": "revenue"
      },
      {
        "kind": "metric",
        "metric": "units"
      }
    ]
  }
}
Query
{
  "steps": [
    {
      "kind": "select",
      "metric": "revenue",
      "transform": null,
      "within": [],
      "along": null,
      "alias": null
    },
    {
      "kind": "select",
      "metric": "units",
      "transform": null,
      "within": [],
      "along": null,
      "alias": null
    }
  ],
  "by": [
    {
      "ref": {
        "dimension": "category",
        "transforms": []
      },
      "alias": null
    },
    {
      "ref": {
        "dimension": "channel",
        "transforms": []
      },
      "alias": null
    }
  ],
  "slice": [],
  "order_by": [
    {
      "ref": "category",
      "direction": "asc"
    },
    {
      "ref": "channel",
      "direction": "asc"
    }
  ],
  "limit": null
}