Best Of
Creating rolling averages in Magic ETL and de-emphasizing recent dates
At the most recent Domo Community Virtual Meetup, Michael Christensen demonstrated how to build out 90 day rolling averages using MySQL while also de-emphasizing the most recent dates in a multi-line chart.
I was inspired the demonstration and wanted to create the same thing, but using Magic ETL. In this video, I walk you through how to do it. I hope you find it helpful
Re: Changing Font Color
Hi @gotex
The blue text is because you make the text a hyperlink (<a href=...>). If you don't need it to be a hyperlink remove the anchor (<a> & </a>) tags from your text. If you need to have the hyperlink you'll need to add a style to the <a> tag:
<a href="#" style="color: #bbe491">
Also make sure you're using an HTML table as not all HTML tags are supported in Mega Tables.
Your second code sample changes the background color of the cell instead of the font color. If you want to change the text color only then you can replace `background-color` with `font-color`.
Going back to your original question - have you confirmed that your `BI_Weight` field is actually returning 5 or could it be a near 5 (like 5.1)?
You may want to make it a bit easier to read and use something like:
CONCAT ('<div style="font-color:',
CASE
When `BI_Weight` ='5' then '#A43724'
When `BI_Weight` ='4' then '#F1F1F1'
ELSE ''
END,
'">',
`ICR_NUMBER`,
'</div>')
Re: Question on breakeven formula
I would suggest pivoting the data in Magic ETL so each day is a row and then you can use the rank & window tile to create a running total. This will allow you to easily determine which day you broke even on. You can then pivot it back to your original format if you really wanted to. However, I would instead suggest keeping it in the day/row format and then using the pivot table chart to display it in the format of your screenshot.

