Conditional Formatting on a Date in a Card Table

I have a date formatted column in a Card using a Table that I would like to apply a gray shade to the cells when the date is missing. I see other DOMO discussions where HTML Table was recommended and to use HTML in the Beast Mode however I'm not having luck.

Best Answer

  • ssheffer77
    ssheffer77 Member
    Answer ✓

    This worked:

    case when replace(Date,'00:00:00','')
    like '%-%' Then replace(Date,'00:00:00','')
    else 'No Date' End

    Applied Color Rule on the Beast Mode above on No Date and was able to highlight my missing date cells. The nulls have "No Date" vs a blank however should not be a problem for my scenario.

Answers

  • @ssheffer77 Can you share the beast mode that you tried?

  • Have you tried utilizing color rules and making the condition where isn't blank to apply to the cell and not the entire row?

    You may need to use a beast mode to set a default as it may not show empty value as an option.

    COALESCE(`Date Column`, 'MISSING DATE')
    

    Then set color rules based on the beast mode where the value is MISSING DATE

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • @MichelleH I tried the below with attempt to apply a Color Rule on "No Dates" however the condition wants to still have date logic used.

    CASE WHEN ifnull(Date Proposal Sent,0)=0 THEN 'No Date' Else Date Proposal Sent End

    Trying to play around with this one but no luck either (I would still need to add correct color to the below).

    CASE

    WHEN ifnull(`Date Proposal Sent`,0)=0 THEN CONCAT('<div style="background-color:#bbe491; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', `Date Proposal Sent`, '</a></div>')

    WHEN `Date Proposal Sent` < "01/01/1900" THEN CONCAT('<div style="background-color:#fcbcb7; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', `Date Proposal Sent`, '</a></div>')

    END

  • @GrantSmith I tired different beast mode functions with the color rules and so far each attempt is not allowing a condition on "missing date" but still working on this one to see if anything will work.

  • ssheffer77
    ssheffer77 Member
    Answer ✓

    This worked:

    case when replace(Date,'00:00:00','')
    like '%-%' Then replace(Date,'00:00:00','')
    else 'No Date' End

    Applied Color Rule on the Beast Mode above on No Date and was able to highlight my missing date cells. The nulls have "No Date" vs a blank however should not be a problem for my scenario.