locked
Combined IF AND statement help- Power Query RRS feed

  • Question

  • Hi,

    I need help with power query, I have a table with the following details

    Touch Date Skill Start Date End Date
    14-Aug-17 Trained    
    14-Aug-17 Trained    
    13-Aug-17 Trained 12-Aug-18 18-Aug-18
    13-Aug-17 Trained 12-Aug-18 18-Aug-18
    17-Aug-17      
    19-Aug-17 Trained 19-Aug-18 26-Aug-18

    I am trying to get the following results in a custom column

    • If Skill = "Trained" and Start Date and End Date is blank  then "Proficient"
    • If Skill = Blank and Start Date and End Date is blank then blank
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week1
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week2
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week3
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week4
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week5
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week6
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week7
    • If Skill = "Trained" and Touch Date is equal to or greater than Start Date and less than equals to End Date then Week8

    The final result should look like this

    Touch Date Skill Start Date End Date Proficiency
    14-Aug-17 Trained     Proficient
    14-Aug-17 Trained     Proficient
    13-Aug-17 Trained 12-Aug-18 18-Aug-18 Week1
    13-Aug-17 Trained 12-Aug-18 18-Aug-18 Week1
    17-Aug-17        
    19-Aug-17 Trained 19-Aug-18 26-Aug-18 Week2
    25-Aug-17 Trained 19-Aug-18 26-Aug-18 Week2
    28-Aug-17 Trained 27-Aug-18 2-Sep-18 Week3

    Thanks for the help


    • Edited by Joe1Joe Monday, October 1, 2018 6:27 PM
    Monday, October 1, 2018 6:25 PM

Answers

All replies