Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculated column with condition

Hello Everyone!   First of all, thanks for alwayg being so helpful!   I am trying to find a formula to determinate if an order is normal or customized.   If my order number contains product typ...
  • V-lianl-msft's avatar
    V-lianl-msft
    6 years ago

    Hi Anonymous ,

     

    Try this measure:

    Measure 2 =
    VAR type_no =
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[PRODUCT TYPE] ),
            ALLEXCEPT ( 'Table', 'Table'[ORDER] )
        )
    RETURN
        IF ( type_no > 1, "CUSTOM", "NORMAL" )

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.