Best Of
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.
Re: Standardizing Names
You'd need to do a cartesian join on your dataset with your mapping dataset, apply the rule, and then reduce your dataset back to the original size.
Start by adding a new column called Join Column with a value of 1 to each your input dataset and your mapping dataset.
Join these two datasets together on the new join column.
Use a formula tile to calculate the new grouping:
CASE WHEN `insurance_company` LIKE `SearchString` THEN `Reclass` END
Then feed that into a group by, grouping by your identifier field and selecting the max of the formula to get the actual mapping.
Take that output and join it back to your original dataset.
Re: How to exclude/filter out based on 2 dates
@WorldWarHulk keep in mind that you're basically doing a cross join for the tables, so for example if in the original table you had an entry with a date of 7/5/2021, this will appear once for each exclusion period you have in your other table, the one you shared a screenshot of, and the filter will only remove the entry for the period Jun 23 2023 - Jul 6, 2023, still leaving the others in.
If the idea is not to have repeated entries, but only remove from the original dataset those where the date field falls into any of the exclusion periods you have defined, you'll need to do a couple of extra steps after the cross join.
- Add a Formula Tile that will identify if the date falls between the exclusion period:
CASE WHENdate>=Wipe Date (BOQ)ANDdate<=Forecast Due DateTHEN 1 ELSE 0 END - Add a Group Tile that will include all the columns from your Original table and do either a SUM or MAX on the formula field we just created. This will return your dataset to it's original size, but now you'll have a flag that tells you whether that entry date falls under any of the given exclusion periods.
- Now do the filter based on this rolled up flag being 0, so you are keeping only the entries that do not fall under any exclusion period.
- Use an Output Tile to write it to a new dataset you'll use for your cards.
Hope this helps.
07.26.2023 Release Notes
Read up on the recent release notes HERE.
Please take advantage of this new "Product Release Questions" Forum board where our Support team is here to quickly answer any questions you have about new features.



