Best Of
Re: ¿How can I classify an object based on conditions?
@andersson_morales19 You're case when statement isn't working because of the waterfall. CASE WHEN statement go through each part of the statement and once a condition is met, it doesn't evaluate anything else. So in the case of your beast mode, if a row meets the 'Basico' condition, it assigns it as 'Basico' and won't evaluate it further, even if it meets other conditions in the statement. So level two and level three will always meet level one conditions, so as you have it right now, you'll never find level two and three, everything will just be level one. You would need to reorganize your case when statement to start with the conditions for level three, then level two, and end with level one. Hope that makes sense!
Re: "current year, current month" and "previous year, current month" Beast Modes
@damen Current month:
case when YEAR('Transaction Date') = YEAR(CURDATE()) and MONTH('Transaction Date') = MONTH(CURDATE()) then 'amount' end
Previous year, current month (assuming this means same month last year):
case when YEAR('Transaction Date') = YEAR(CURDATE()) -1 and MONTH('Transaction Date') = MONTH(CURDATE()) then 'Amount' end
Re: "current year, current month" and "previous year, current month" Beast Modes
@damen Just noticed that the beast mode you posted of what you're using, you put:
then 'amount' end
You're using 'amount' as a string so you're saying when the row meets that condition put in the word 'amount' and since the column is intergers, it comes in as nothing. You need to use whatever column contains your values.
Re: "current year, current month" and "previous year, current month" Beast Modes
@damen The beast mode you have is for current month, not current year. It will only have values for the current month (2022-Sep).
Re: "current year, current month" and "previous year, current month" Beast Modes
@damen In your screenshot where you showed the "Current Year" beast mode, be sure to use the " ` " symbol around your Transaction Date and amount fields, instead of " ' ", so that Domo knows you are referring to columns.
It should look like this, when forcing to a number as @GrantSmith suggested:
case when YEAR(`Transaction Date`) = YEAR(CURDATE()) and MONTH(`Transaction Date`) = MONTH(CURDATE()) then `amount`*1 end
Re: SQL Flow taking hours to run
To give some context, I’ve seen MySQL dataflows take 4-5 hours and then their Magic 2.0 replacement take 10-15 minutes. Unless you’re doing like a stored procedure Magic 2.0 is the way to go.
Re: Integrating different social media platforms reporting
@SaloniShah Yes, when you save the ETL, you can choose how you want it to update, and one of the options is to update it when ever datasets used are updated.
Re: SQL Flow taking hours to run
This will run faster is you utilize indexing in MySQL (help article), which would require a transform for each of your tables to create two new columns for the month extracts you are joining on...e.g. LDGRDATE_Month and LDGRDATE_PriorMonth. Once those columns are created, you can add an index to them prior to joining them in your statement above, which should improve runtime.
I would also recommend utilizing Magic ETL 2 and using the formula tile to extract the month parts and then joining on those columns, this would likely be the most optimal runtime.
Re: How to calculate % of projects assigned?
SUM(case when 'DaysToAssigned' <= 10 then 1 else 0 end)/SUM(1)
Re: Account Ledger Running Balance Beast Mode
You'll want to do this utilizing an ETL. It's possible to do it in a Beast Mode with window functions however it would start on the first date that is filtered and not going back entirely in time to the start of your ledger. For example if you only displayed this year the beast mode variant would have $0 to start the year rather than the carry over from last year.
Here's a prior solution to using MySQL ETL to get a running total you could look at.
https://dojo.domo.com/t5/Beast-Mode-ETL-Dataflow/Running-total-ETL-or-MySql/m-p/39593



