I’m trying to calculat the % of each cell with total cost, but the cell value is already with calculated aggregation (filter). So when adding calcuation i get the below error.
Nesting of aggregate functions like percentOfTotal and PERCENTOFTOTAL(SUM(SUM(CASE WHEN “charge_type” = _UTF16’SavingsPlanCoveredUsage’ THEN “unblended_cost” ELSE NULL END) + SUM(CASE WHEN “charge_type” = _UTF16’Usage’ THEN “unblended_cost” ELSE NULL END))) is not allowed.
I tried with this method but getting the error as “The syntax of the calculated field expression is incorrect. Correct the syntax and choose Create again.” for charge_type
Can you try this:
sumOver({Value}, [{Subregion}], PRE_AGG)/sumOver({Value}, , PRE_AGG)
Also, here I am using {Subregion} to match the table that you shared. I believe if you partition the sumOver calc by the smallest level in your fields it should work.
Can you show me what you mean by only getting 60%? Do you mean that it is only returning 60% as the final value or that it is only totaling 60% of expected values?