Forum Discussion

marvelbites06's avatar
marvelbites06
Frequent Visitor
2 years ago
Solved

DAX for multiple Conditions: IF and OR

I have a situation Where I want to use 4 conditions for Calculate the Sum of the Qty. Below is the base DAX That I am using but i have the put filter on the Page to get the results. Now I want to com...
  • marvelbites06's avatar
    2 years ago

    Got the Solution. Thank You. Filtering Issue. 

     

    Blocked =
        VAR Result =
            SUMX(
                MATERIAL_MOVEMENT_FACT_G_VW,
                VAR PosQty =
                    IF(
                        AND(
                            MATERIAL_MOVEMENT[QuantityNum] > 0,
                            OR(
                                MATERIAL_MOVEMENT[MovementTypeCd] = "344",
                                OR(
                                    MATERIAL_MOVEMENT[MovementTypeCd] = "996",
                                    MATERIAL_MOVEMENT[MovementTypeCd] = "Z44"
                                )
                            )
                        ),
                        MATERIAL_MOVEMENT[QuantityNum],
                        0
                    )
                RETURN PosQty
            )
        RETURN Result