How to I bring the % of total or Contribution from a grand total to a new column in Table chart?

Hi,

 

I am trying to use normal Table card and Sumo card where I have categories in Column A, and count of categories in coumn 2. I would like to bring the Contribution or % of total of each categories listed in Column A. There is an option % of total in properties but it comes under row which is not required. So please help me how we can bring the % of total in a new column.

 

Please help us whether we can use ETl or beast mode calculaution to work on it.

Best Answer

  • GrantSmith
    GrantSmith Indiana 🔴
    Accepted Answer

    It's displaying blanks because you likely have nulls in your field you're calculating. You can fix that issue by utilizing IFNULL in your BeastMode

    `To Skill` / SUM(IFNULL(`To Skill`, 0))

     

    With that being said this still won't answer your initial request. This is because the assumption was that the totals were calculated prior to being pulled into the card rather than depending on the card to summarize the counts. Domo can't handle a grouping within a grouping. To get around the issue you'd need to create a new dataflow to do your grouping and count first and then using that dataflow as your input for the card. Then the code above should work correctly for you to get a percentage of the totals.

     

     

     

Answers

  • GrantSmith
    GrantSmith Indiana 🔴

    You should be able to do a Beast Mode calculation:

     

    `Column 2` / SUM(`Column 2`)

     

    This will get you the percentage breakdown across the entire dataset. (Make sure it's formatted as a % in your card)

     

    Assuming this is your data:

     

    | Column A | Column 2 | Percentage |

    | ------------- | ------------- | ---------------- |

    | Cat 1        | 10             | 40%            |

    | Cat 2        | 8               | 32%            |

    | Cat 3.       | 1               | 4%              |

    | Cat 4.       | 6               | 24%            |

  • Hi

     

    I got your reply and Thank you so much for a quick reply.

     

    However based on your request, I tried using the calculation in beast mode but unlucky, i didnt get the outout. I am not sure whether I adid it correctly. 

     

    Please look at the snap shot in the atatched file. Please correct me if I did it incorrectly.

     

    Waiting for your reply Team.

     

  • Thanks for providing the solution but as you said using this in beastmode calculation it doesnt work, however as you said will try in ETL and let see if it works.

     

    Thanks for taking time on this buddy.