Forum Discussion

Peter_2020's avatar
Peter_2020
Helper III
4 years ago
Solved

Filter with specific definition

Hi all,  I would like to ask you for help with DAX formula for following situation: I have this simple table with 2 columns where is order number and operation number: ORDER OPERATION 111 ...
  • v-angzheng-msft's avatar
    4 years ago

    Hi, Peter_2020 

     

    Try to create a measure like this:

    Measure = 
    VAR _OR_OP=SUMMARIZE(FILTER(ALL('Table'),'Table'[ORDER]=MAX('Table'[ORDER])),[OPERATION])
    VAR _IF=
        IF( {2} IN _OR_OP&&{4} IN _OR_OP
            ,1,0
            )
    
    RETURN _IF

    Result:

     

    Please refer to the attachment below for details. Hope this helps.

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


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