                 rendererOptions: opts.rendererOptions
                 cols: [], rows: []
 
+            numInputsToProcess = opts.aggregators[aggregator.val()]([])().numInputs
             vals = []
             @find(".pvtRows li span.pvtAttr").each -> subopts.rows.push $(this).data("attrName")
             @find(".pvtCols li span.pvtAttr").each -> subopts.cols.push $(this).data("attrName")
-            @find(".pvtVals li span.pvtAttr").each -> vals.push $(this).data("attrName")
+            @find(".pvtVals select.pvtAttrDropdown").each ->
+                if numInputsToProcess == 0
+                    $(this).remove()
+                else
+                    numInputsToProcess--
+                    vals.push $(this).val() if $(this).val() != ""
+
+            if numInputsToProcess != 0
+                pvtVals = @find(".pvtVals")
+                for x in [0...numInputsToProcess]
+                    newDropdown = $("<select class='pvtAttrDropdown'>")
+                        .append($("<option>"))
+                        .bind "change", -> refresh()
+                    for attr in shownAttributes
+                        newDropdown.append($("<option>").text(attr))
+                    pvtVals.append(newDropdown)
+
+            if initialRender
+                vals = opts.vals
+                i = 0
+                @find(".pvtVals select.pvtAttrDropdown").each ->
+                    $(this).val vals[i]
+                    i++
+                initialRender = false
 
             subopts.aggregatorName = aggregator.val()
             subopts.vals = vals

        push:  -> @count++
        value: -> @count
        format: formatter

    countUnique: (formatter=usFmtInt) -> ([attr]) -> (data, rowKey, colKey) ->
        uniq: []
        push: (record) -> @uniq.push(record[attr]) if record[attr] not in @uniq
        value: -> @uniq.length
        format: formatter

    listUnique: (sep) -> ([attr]) -> (data, rowKey, colKey)  ->
        uniq: []
        push: (record) -> @uniq.push(record[attr]) if record[attr] not in @uniq
        value: -> @uniq.join sep
        format: (x) -> x

    sum: (formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->
        sum: 0
        push: (record) -> @sum += parseFloat(record[attr]) if not isNaN parseFloat(record[attr])
        value: -> @sum
        format: formatter

    average:  (formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->
        sum: 0

            @find(".pvtCols").append @find(".axis_#{shownAttributes.indexOf(x)}")
        for x in opts.rows
            @find(".pvtRows").append @find(".axis_#{shownAttributes.indexOf(x)}")
        if opts.aggregatorName?
            @find(".pvtAggregator").val opts.aggregatorName
        if opts.rendererName?
            @find(".pvtRenderer").val opts.rendererName

        initialRender = true

        #set up for refreshing
        refreshDelayed = =>
