Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

If with And statement 3 times

Hi Experts

 

Not sure if the following is correct, i am trying to use the "And" statement x3 within a IF...

 

CheckFlag = IF(And(FACT_NEWBI_NewSalesDashboard[InvoiceChecked]=True,FACT_NEWBI_NewSalesDashboard[InvoiceNumber]=BLANK()) && FACT_NEWBI_NewSalesDashboard[SOPostingDate]=BLANK(),1,0)
  • Anonymous  You can try something like this also,

    CheckFlag = IF(FACT_NEWBI_NewSalesDashboard[InvoiceChecked]=True && FACT_NEWBI_NewSalesDashboard[InvoiceNumber]=BLANK() && FACT_NEWBI_NewSalesDashboard[SOPostingDate]=BLANK(),1,0)

2 Replies

  • JirkaZ's avatar
    JirkaZ
    Icon for Solution Specialist rankSolution Specialist

    It is correct and it really doesn't matter if you'd use AND as a DAX function or use the logical operators && in the IF statement.

  • Anonymous  You can try something like this also,

    CheckFlag = IF(FACT_NEWBI_NewSalesDashboard[InvoiceChecked]=True && FACT_NEWBI_NewSalesDashboard[InvoiceNumber]=BLANK() && FACT_NEWBI_NewSalesDashboard[SOPostingDate]=BLANK(),1,0)