How can I calculate a percent of total in a Beast Mode?
I'm trying to perform a percent of total calculation in a Beast Mode column - who can help?
In Excel, I would do something like this: $B2/SUM($B$2:$B$10)
Here's the catch - I have certain "groups" in Column A, for example, that need to be filterable, with the percent of total calculation updating with the filter.
Domo performs the filtering gracefully, but I do not know how to do the percent total. This Beast Mode attempt seemed obvious:
=`unit sales`/sum(`unit sales`)
Problem with the above... when we use it, we just get "no data" or whatever Domo says when you've input a technically valid, though ultimately useless, formula.
So, in my head I want to use a "SumIf" function from Excel like this:
= `unit sales`/sumif(`group name`,"= the filtered group name",`unit sales`)
I know I can do this with a pie chart without any Beast Mode schenanigans, but I want the results displayed side by side in a bar chart.
Final example: I have 100 retail locations in three states; ME, NH, VT. In January, Coke had 30% of soda sales across all three states, Pepsi had 50%, other brands = 20%. Now, I want to filter by state. Select ME from the Analyzer box, and those % totals should update (ex: in ME, Coke = 40%, Pepsi = 30%, Other = 30%).