Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of values on data points in a Trellis bar chart

As shown in the below bar graph( part of a trellis chart), it has the count of complaints for a region based on certain criteria. I have set the dimension limit(for Product component) to top 15. Now I need to find the total of the values on the data points(i.e 221) and display in in the title for each section of the trellis. The Trellis dimension is a dealer name.

bar_Graph.PNG

the expression that used for the count in this chart is

=Count({<CAL_YEAR={'$(=Max(CAL_YEAR))'},CAL_QUARTER={$(vPrevQuarter)},DealerZone={'WEST'}>}[Complaint Number])

Require further help. Thanks in advance

3 Replies
sunny_talwar

Would you be able to share your sample app to look at this?

Not applicable
Author

I don't have a sample application but I tried using this expression to get the sum.

=Sum(aggr(Count({<CAL_YEAR={'$(=Max(CAL_YEAR))'},CAL_QUARTER={$(vPrevQuarter)},DealerZone={'WEST'}>}[Complaint Number]), [Product Component]))

It shows the SUM for but not just the top 15. I need to find the sum for the top 151 only.

Anil_Babu_Samineni

May be use, Rank function like this

=Sum(aggr(Rank(Count({<CAL_YEAR={'$(=Max(CAL_YEAR))'},CAL_QUARTER={$(vPrevQuarter)},DealerZone={'WEST'}>}[Complaint Number]))<=151, [Product Component]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful