How to add percentage in the pivot table?

ndldty
ndldty βšͺ️

Hi,

I'm new to Domo. Is there any way how to add a percentage in the pivot table? So, besides the total, I would also like to know the percentage of each category.


Thank you.

Best Answers

  • amehdad
    amehdad 🟒
    Accepted Answer

    Hi @ndldty, you can create a beast mode for % of total by using a window function, for example:

    Sum('Value')

    /

    Sum(Sum('Value)) over ()

  • amehdad
    amehdad 🟒
    edited October 28 Accepted Answer

    For % by category, you would use:

    over (partition by Category) in the above formula.

    You'll need to check with your Customer Success Rep if that feature is enabled for you.

Answers

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟀

    It's also worth pointing that sometimes you can achieve the same look by using the mega table, which will give you the option to just check a box to get percent of total instead of having to write a beast mode.

    This will depend on how you are wanting to present the data, but is worth looking into.

  • amehdad
    amehdad 🟒

    Hi @ndldty, how did you go with this?

  • ndldty
    ndldty βšͺ️

    Hi @amehdad thank you for the suggestion. I just tried using the formula you have suggested, and somehow I got an error.

    I create a pivot table card based on the data that I have.

    I would like to show the percentage in the column, so it will look like this spreadsheet pivot table that I previously create

    I'm using the formula you've suggested:

    Sum('Employee')

    /

    Sum(Sum('Organization')) over (partition by 'Employee')

  • amehdad
    amehdad 🟒

    What's the error message you are getting?

  • ndldty
    ndldty βšͺ️

    it says:

    "An issue has occurred during processing. We are unable to complete the request at this time."

  • amehdad
    amehdad 🟒

    Have you had your Customer Success Manager switch on the feature for Window Function in your instance?

  • ndldty
    ndldty βšͺ️

    Sorry, I just have time to try it. It's working now. Thanks for the suggestion. @amehdad