Sum up different percent of a metric as a calculated field


I was working with a new analysis and reached a blocker when trying to implement a logic based on my requirement. Let me share with an example:
date Sale
19.06.2023 20,000
20.06.2023 34,000
21.06.2023 25,000

I need a field say. percent_sales = 22% *20000+ 72%*34000+6%*25000

Any guidance is appreciated!

Hi @Jijith

To confirm are you looking for percent of total?

And then you want to multiply it by the sale for that date?

percentOfTotal(sum({sale})) * sumOver(sum({sale}),[{date}])

Hi @Max ,

Just figured how to do it. Thanks for the response!!

1 Like