Forum Discussion

HenryJS's avatar
HenryJS
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Power Query Column IF Statement

Hi all,

 

How can I create a Power Query IF Statement that states:

 

if [combined insurances] >= today then "Yes"

 

OR

 

if [Professional Indemnity Insurance] AND [Public Liability Insurance] >= today then "Yes"

 

Else null

 

 

 

  • Hi HenryJS ,

     

    Try below code:-

    if [combined insurances] >= DateTime.LocalNow() 
    then "Yes"
    else if [Professional Indemnity Insurance] >= DateTime.LocalNow() and [Public Liability Insurance] >= DateTime.LocalNow() 
    then "Yes"
    else null

     

    Thanks,

    Samarth

1 Reply

  • Samarth_18's avatar
    Samarth_18
    Icon for Community Champion rankCommunity Champion

    Hi HenryJS ,

     

    Try below code:-

    if [combined insurances] >= DateTime.LocalNow() 
    then "Yes"
    else if [Professional Indemnity Insurance] >= DateTime.LocalNow() and [Public Liability Insurance] >= DateTime.LocalNow() 
    then "Yes"
    else null

     

    Thanks,

    Samarth