Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

ifnull statement comparison operator

 
I've recently had help with the following post  Converting MySQL ifnull to ... I think if(isblank... amitchandak 
 which helped to convert the SQL command from  ifnull(meme_trm,"2099-01-01") >= "2020-01-01" to IF(ISBLANK(Lives[meme_trm]),DATE (2099, 01,01) ,Lives[meme_trm] )
 
However the >= operator is an important piece of this.  What is the best way to stitch in the >=? (the greater than or equal to operator)?

2 Replies

  • COALESCE(Lives[meme_trm],"2099-01-01") >= "2020-01-01"

     

    will return true/false.  What do you want to do with the result next?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your help, I'm working to use this as a filter, I'll replace the  "2020-01-01" with min('Calendar'[Date]) below.  I'll test this and reply later, thanks again.

       

      MJLT Total Lives =
      CALCULATE([Running Total Lives]
      ,
      Filter (Lives,
      (
      Lives[meme_eff] <= MAX('Calendar'[Date])
      &&
      Lives[clip_eff] <= MAX('Calendar'[Date])
      &&
      Lives[meme_trm] >= min('Calendar'[Date])
      &&
      Lives[clip_trm] >= min('Calendar'[Date])
      &&
      Lives[cli_trm] >= min('Calendar'[Date])
      )
      )
      ) +0