Forum Discussion

RodrigoSV's avatar
RodrigoSV
Regular Visitor
3 years ago
Solved

Excel Formula to DAX

Hello All,   I have an Excel formula that needs to be converted to DAX: '=IF(AND([@[CREATION DATE < 6 MONTHS]]="";[@[PLANT_LEVEL_STATUS]]="ACTIVE";[@[IS THE LAST INVOICE DATE < 730 DAYS?]]="";[@S...
  • BrianConnelly's avatar
    3 years ago

    First, the AND function in DAX accepts only two (2) arguments.  You can't write that in that manner.  Change your code to something like this:

    AND(
            [CREATION DATE < 6 MONTHS] = BLANK(),
            AND([PLANT_LEVEL_STATUS] = "ACTIVE",
            AND([IS THE LAST INVOICE DATE < 730 DAYS?] = BLANK(),
            AND([STOCK] = BLANK(),
            AND([DOES IT HAVE OPEN SALES ORDERS?] = BLANK(),
            AND([DOES IT HAVE OPEN PRODUCTION ORDERS?] = BLANK(),[DOES IT HAVE ACTIVE PURCHASE ORDERS?] = BLANK())))))
        )

     

    and the second part as:

    AND(
                [CREATION DATE < 6 MONTHS] = BLANK(),
                AND([PLANT_LEVEL_STATUS] = "ACTIVE", [IS THE LAST INVOICE DATE < 730 DAYS?] = "YES")
            )