Forum Discussion

camilleamiel's avatar
camilleamiel
New Member
4 years ago
Solved

If function with date to return text issues

Hello PBI community,

 

I'm pretty new in using PBI, 

I am trying to do a If function with a date to return a text and apparently I have issue with the comparaison of these 2 types of values
Could you help with my several tests below ?

test 1:
IF(IS BLANK('BDD projets'[Date envoi mail]),'BDD projets'[Date envoi mail]="Mail à envoyer",'BDD projets'[Date envoi mail]="-")
test 2:
IF('BDD projets'[Date envoi mail])="",'BDD projets'[Date envoi mail]="Mail à envoyer",'BDD projets'[Date envoi mail]="-")
test 3:
IF('BDD projets'[Date envoi mail]=TODAY(),'BDD projets'[Date envoi mail]="Mail à envoyer",'BDD projets'[Date envoi mail]="-")
 
Thank you for your help.

Camille
  • Hi camilleamiel 

     

    Test 1 and 2 are same, try this measures:

     

    Test 1 & 2 = IF(ISBLANK(max('BDD projets'[Date envoi mail])),"Mail à envoyer","-")

    Test 3 =  IF(max('BDD projets'[Date envoi mail])=today(),"Mail à envoyer","-")
     
     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/


     

     

2 Replies

  • Hi camilleamiel 

     

    Test 1 and 2 are same, try this measures:

     

    Test 1 & 2 = IF(ISBLANK(max('BDD projets'[Date envoi mail])),"Mail à envoyer","-")

    Test 3 =  IF(max('BDD projets'[Date envoi mail])=today(),"Mail à envoyer","-")
     
     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/


     

     
    • camilleamiel's avatar
      camilleamiel
      New Member

      Thank you, I just remove "max" and solution works ! thanks for your help !