Skip to main content

I want to replicate a SF chart in Skuid.  Simply a column chart with the sum of opportunities split by product.  Data axes = Amount; category axes = Product Name.  How do I get product name as a category field?

Tyler,


I did this using an Aggregate model on Opportunity Line Items. I sum on Opportunity.Amount and Group By Product.Name. Is this what you are after?



<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true"> <models>
<model id="OppByProduct" limit="" query="true" createrowifnonefound="false" datasource="salesforce" type="aggregate" sobject="OpportunityLineItem">
<fields>
<field id="Opportunity.Amount" name="sumOpportunityAmount" function="SUM"/>
</fields>
<conditions/>
<actions/>
<groupby method="simple">
<field id="Product2Id" name="product2Id"/>
<field id="Product2.Name" name="product2Name"/>
</groupby>
</model>
</models>
<components>
<skuidvis__chart model="OppByProduct" maintitle="{{Model.labelPlural}}" type="column" uniqueid="sk-PQVRj-123">
<dataaxes>
<axis id="axis1"/>
</dataaxes>
<categoryaxes>
<axis id="categories" categorytype="field" field="product2Name"/>
</categoryaxes>
<serieslist>
<series valuefield="sumOpportunityAmount" splittype="none"/>
</serieslist>
<colors/>
<legend layout="horizontal" halign="center" valign="bottom"/>
</skuidvis__chart>
</components>
<resources>
<labels/>
<javascript/>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Thanks,


Bill


Thanks Bill, that is what I needed.  Although, I have an oppty chart that responds to table filters for Owner, Close Date, stage and it is also filterable on product.name through a opptylineitem subquery condition on the oppty model.  Ideally, I would like to have that chart with product.name as a category.  For now I’ll move forward with two visualisations. 


Got into building my chart and your solution, Bill, will deliver everything I need, AWESOME!!