Custom Computation based on a filtered data point

I have a scenario where I need to do a computation based on a predetermined proportion as below

If company category = tenant

Allocated cost = total_amortized_cost + Direct cost % * total amortized cost (if Company = ‘ABC Corp’)

For example, For Emirates (in Dec’21), the allocated cost should be computed as $283.5K+17.1%*($619K) = $388.9K

I am able to get the allocated cost at an aggregate level but run into errors when I try to compute this for each of the fields under ‘Tenant’

What are your direct cost % and total amortized cost calculations?

Hi Max

Total Amortized cost, year_month and Company are not computed but part of the original data set. I will share the computation for direct cost as below -

Company Category = ifelse(isNull(Company),‘Null’,ifelse(Company<>‘ABC Corp’,‘Customer’,‘Central’))
Direct cost = sumOver(sum({total_amortized_cost}),[{Company Category},{year_month}])
Direct Cost% = sumif({total_amortized_cost},{Company Category}=‘Customer’)/({Direct cost })

Hello @Arvind_Shastry !

I am going to archive this topic since it has been open for an extended period of time. If you would still like assistance with this, or if you have a new QuickSight question, feel free to post a new topic in the community so you will be at the top of the priority list for a response from one of our QuickSight experts. Thank you!