sum column values
I have a column total revenue which is calculated for each customer on a separate row, but I'm wanting to total alll the total revnue values together for all customers then divide each indivudal revenue by the toal to get a % per customer, is this possible?
thanks
Comments

I am thinking one way you could do this is add a column in which you assign a calculation to be the values.
Ex.
SELECT
SUM(Individual Revenues) AS Total RevenueThis would give you a column with total revenue as a number, you could then do one more column in which the calculation would be like
[Individual Revenues] / [Total Revenue] AS Customer%
Aside from column names and a little syntax this should work. Let me know!
0 
would I do the first calculation on the dataflow?
0 
basically I need to be able to sum all the values in the total revenue column then be able to divide each on individually into that total
0 
In that case, yes, you would do the first calculation on the DataFlow. Doing it there will create a new column in general (it will be the same number the whole column).
Once you have this column, you can do a BeastMode calculation on a card to calculate the individual revnue % by each customer. If need be, I can post some screenshots on how to do so, but let me know.
0 
yes, if you could post a couple screenshots that would be great
thank you
0 
so I have the totals for each customer group together, I just then need another calculation for all of those totaled together....the attched screenshot shows what we did to get the total revenue for each customer, we then need all of those totaled together to get a grand total of total revenue
0 
The first part is perfect. This will give us a column we can use for each individual value/calculation.
The next part would be done in the BeastMode section of the card analyzer. You would add a new calculation to give you the % of revenue by each customer. After this, the calculation will show up as a datapoints on the left hand side which you are able to add to the table. I attached some screenshots to help show which locations I am talking about.
Let me know if this works for you!
0 
how do I calculate the CustomerTotalRevenue?
0 
That is the number you just calculated on the dataset with the ETL process.
0 
so my calculation, Total Revenue is calculiating the total revenue for each customer, but how do I total all the total revnue amounts up after that?
0 
If you want total revenue (not per customer) you need a new column that takes a sum of all of the revenues and sums them together for one value for the entire column. You can use this against the individual revenues. I feel I am starting to repeat myself now so there is not much more help I can offer. Best of luck.
0 
yeah, that is what I'm trying to do is get a sum of that column of customer revenues so that I can get my percentage of revenue for each customer
TotalRevenue/Sum of All Total Revenue's
thanks
0 
I just came across a way that should be able to solve your problem.
Instead of creating the dataflow with the ETL feature, use the SQL feature.
Once here, you will choose the same dataset as the input dataset. However, for one of the transforms you will sum the profit column. I attached an image to show what this might look like. From here, you should have a column with the same total revenue number for all companies which you can then use to figure specific %.
Hopefully that helps!
0 
how do you write the Output_dataset?
thanks
0
Categories
 11.3K All Categories
 6 Private Company Board
 2 APAC User Group
 12 Welcome
 45 Domo News
 10.2K Using Domo
 2K Dataflows
 2.6K Card Building
 2.3K Ideas Exchange
 1.3K Connectors
 354 Workbench
 271 Domo Best Practices
 13 Domo Certification
 483 Domo Developer
 58 Domo Everywhere
 113 Apps
 734 New to Domo
 86 Dojo
 Domopalooza
 1.1K 日本支部
 4 道場日本支部へようこそ
 31 お知らせ
 65 Kowaza
 305 仲間に相談
 667 ひらめき共有