According to Tyler R., this is the solution:
“Yes, you can sum an entire column in Beast Mode, creating a new column with the SUMIF of another column. However, the specific use case you provided would first require some pre-aggregation of the data prior to the building of the card. This would require the use of DataFlows. If you need assistance with doing this in DataFlows, please let us know.”
Welcome to Dojo, selbadramany. Since the sumifs of a column are usually what shows up in graphs and charts in Domo, I am a bit curious as to why you wish to sum them in beast mode. Could you share what you are trying to accomplish?
I am trying to sumif a column in order to perform a beast mode calculation that would have a single data point from one column divided by the sum of all data points in another column. Thx
There is no sumif function within beast mode. However, you can use a CASE statement within the sum function to get to same results.
i.e. SUM(Case when `<fieldname>` = 'test' then 1 else 0 end )
SUM(Case when `<fieldname>` = 'test' then `<ValueField>` else 0 end )
You can use AND in your CASE statement to effectively function like a SUMIF in excel. Something like this -- might take a bit of tweaking for your needs...I chose to divide "/" but you could just as easily use any other operator there.
SUM (CASE WHEN `field` LIKE '%THIS%' AND '%THAT%' THEN `fieldvalue`)
SUM (CASE WHEN `field2` LIKE '%this%' AND '%that%' THEN `fieldvalue2`)
Thanks. I understand the case and AND/OR functionality. What I am trying to accompplish is this:
I have columns with date, unique customer identifiers and unique customer transaction identifier (so a customer may 1-2 transactions per year). I want to calculatate for customers who had a transaction in 2011, how many transactions did they have in 2012, 2013, and 2014. My challenge has been identifying the unique customers in 2011 AND THEN counting all transactions in 2012, then 2013, then 2014 for those specific customers.