Forum Discussion

mabruzzo's avatar
mabruzzo
New Member
2 years ago
Solved

Unique Parent/Child or Orphan

I have a unique challenge involving Parent and Child opportunities that I need assistance with. My data consists of opportunities categorized as either Parent, Child, or Orphan. A Parent opportunity ...
  • hackcrr's avatar
    hackcrr
    2 years ago

    You can work with the current table structure, but organizing the data as you described may require additional calculated columns or measures to effectively group the Parent and Child opportunities.

    You can create a calculated column or measure that identifies the Parent ID for each Child. This will help you group the Children under their respective Parents in the table visual.

    Create a calculated column to establish a display order. For instance, you can assign a numeric value to Parents and their Children based on their relationship, ensuring the Parent is listed first, followed by its Children.

    ParentDisplayName = 
    IF(
        [Type] = "Parent", 
        [ID], 
        [ParentID]
    )
    
    DisplayOrder = 
    IF(
        [Type] = "Parent", 
        1, 
        2
    )
    

    Use the ParentDisplayName in your table to group Children under their respective Parents. Sort the table by ParentDisplayName and then by DisplayOrder to ensure Parents are listed first, followed by their Children.

    For Orphans, since they don't have a ParentID, they will appear on their own, which you can manage through sorting and grouping.

     

    hackcrr

    If I have answered your question, please mark my reply as solution and kudos to this post, thank you!