Skip to main content

I am trying to display a donut that when clicked opens another donut, that when clicked again opens a table displaying the records. There are essentially two conditions the table needs to remember when the user clicks on the second donut segment. 


To do this I am using two models. One aggregate (due to the number of records) and one basic model, used to display the final results in a table format.


The first donut (on the aggregate model) splits on the Current_Membership_Bundle__r.Bundle_Membership_Class__c.


I then go on to set a condition from the clicked segment on the table model named “AllAccounts” (see screenshot)



This drills down into another donut (again on the aggregate model), which splits on the Account_Type__c. Again I set the model condition on “AllAccounts”. (see screenshot)



At this point, when the user clicks on the Account_Type__c segment I’d expect a table to load on the “AllAccounts” model. I’d expect conditions to have been applied to the;

 

Current_Membership_Bundle__r.Bundle_Membership_Class__c field (set in the first donut)


Account_Type__c field (set in the second donut)


See screenshot of the table model



For the first account type selection i click, I am displayed the correct number of records. When I close the pop up, and click another segment, the models loads with the correct Account_Type__c selection, but not the correct Current_Membership_Bundle__r.Bundle_Membership_Class__c selection. In fact it seems to have removed what was previously in this condition.


How do I resolve this issue, so the Current_Membership_Bundle__r.Bundle_Membership_Class__c selection is retained on second click?

Hey Glenn,


I thought what you have setup is pretty solid so I can’t think of what’s the issue on top of my head. However, it might help to isolate this in a separate page to really see what’s going on.


My suspicion is: Do you have 2 grouping conditions for your Aggregate model? I’m wondering if that might be what is causing the issue?


I tried to reproduce what you’re doing, and I found that if I have 2 separate models for the 2 charts, it helps with clarity and it seems to work for me as expected (screen recording, I don’t have the same custom objects, so I’m filtering using Property__r.Property_Type__c and StageName instead, but same concepts) 


  1. First Model for first chart: 
    Aggregate model that counts Id grouping by Current_Membership_Bundle__r.Bundle_Membership_Class__c (let's call it MemClass). Be sure to remove the drilldown context (that extra "Id of records in Id of rows in context")

  2. Second model for second chart drilldown:
    Basic model (NOT query on page load - for performance) that has Current_Membership_Bundle__r.Bundle_Membership_Class__c condition. The donut chart for this model (the drilldown chart) is set to count Id split by Account_Type__c

Then activate conditions and query the 3rd model to display the table in the popup like you have. 

Hope that helps!


Thanks very much Huyen, that’s really helpful. 

I’ve ended up creating a new aggregate model for the account and starting it all again, removing some of the unnecessary duplicate conditions.

My new aggregate model:

Aggregation = countId
Conditions = Current_Memebership_Bundle__c != ‘’
Groupings = Current_Membership_Bundle__r.Bundle_Membership_Class__c
AND
Account_Type__c

On second click of the child segment, the table now displays the correct records, including the parent segment selection.