Best Of
Re: Variables Smart Text - Chart axis + legends
Big Time Need for Date Variables:
Set the default to MYSQL functions like Current_Date. I would guess that 80% of users would prefer this to be the default for a date variable.
Re: Building a filter/fxn for ETL to pick the earlier of two dates when applicable?
You can use the LEAST function to select the smallest value of dates
LEAST(`Observation Date`, `Admit Date`)
If the observation date is null then you'll want to default it to the admit date via a COALESCE or IFNULL:
LEAST(COALESCE(`Observation Date`, `Admit Date`), `Admit Date`)
Re: How can I edit this card to only show one column's data label?
In your Data Label Settings, set Show Datalabels On to Lines Only.
Re: Guidance on Proper Beast Mode Syntax for Nested Cases
Alternatively you can use can type ``` and a code block will pop up for you.
Re: Exception: Error retrieving a Domo API Access Token: "status":401,"Unauthorized","path":"/oauth/toke
I found the mistake. I wrapped variables in brackets😂
Re: Guidance on Proper Beast Mode Syntax for Nested Cases
Hi @arzconci if you click the paragraph icon on the left side of the text editor, it opens more text format options:
Re: Guidance on Proper Beast Mode Syntax for Nested Cases
@arzconci Without seeing your actual data and results, the first thing that stands out to me is the OR in your criteria for 'MISS'. When you are using OR operators, be sure to use parenthesis to group relevant criteria. For example, if both of the statements before and after the OR must be true, then it should look like this:
when ( `actual arrival at pod date` is not NULL AND (DATEDIFF(`actual departure from pod date`,`actual arrival at pod date` ) > `Port free time`) ) OR ( `actual arrival at pod date` is not NULL AND (DATEDIFF(`current date`,`actual arrival at pod date` ) > `Port free time`) ) THEN 'MISS'
Re: What is the syntax to add a "if contains the following" in my logic
It would be best to use the LEFT and SUBSTRING functions to look for those characters since they are always in the same spot. I would write the statement like this:
CASE WHEN LEFT(`shipmenttariffid`,2) = 'AP' AND SUBSTRING(`shipmentariffid`,5,2) = 'MA' THEN `shipmenttariffid` ELSE '#' END
In my case statement, I am looking for AP in the characters 1 and 2 and MA in characters 5 and 6. If I find them, then use the tariff id, otherwise, replace with the #.





