Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

how to calculate the percentage of total

Accepted answer
78
Views
2
Comments

we are trying to calculate the percentage of total for a calculated field '$'

logic for calculating '$' - $1 -$2

image.png

We need to create another field where we calculate the percentage basis the total

Screenshot 2025-03-06 at 6.02.59 PM.png

Can some help suggest how we can achive it.

Thanks!

Best Answers

  • Bhaskar Konar
    Bhaskar Konar Rank 8 - Analytics Strategist
    Answer ✓

    Hi @Vrinda Choraria,

    Create a duplicate of the existing measure in your pivot table and the show it as the Percentage of Column.

    You should be able to achieve it by this way.

    Please find below few screenshot which might be helpful. Please fellow the 'Yellow' Highlight.

    image.png

    image.png image.png

    Hope this help.

    Thank you.

  • Gianni Ceresa
    edited Mar 6, 2025 4:57PM Answer ✓

    Hi @Vrinda Choraria , by taking a shortcut in calculating your delta between 2 periods, you now got yourself into difficulty with the % calculation. What is posted above would work if you had a column in your criteria with the delta between your 2 months.

    But you are using a calculate item with a "relative" expression on the month column based on the row where it is, calculating the difference between 2 periods, which was a quick-win to work across periods in a pivot without having a new measure that would be repeated on screen for every period you have in your analysis.

    You could maybe try with a new calculated item using an "aggregate at" by month to get the total for your rows for each period, and get the total of the delta allowing you to do the % calculation in the same way you did your delta. Not sure if it will really work, it could be pushing too much the behavior of a calculated item.

    Other option will require you to modify your analysis to not be using the calculated item with the delta in the first place, and make 2 measures, one for each month, and then add 1 more measure with the delta calculation and then duplicate that one in the view to have it once as $ and once as %.