Forum Discussion

jostnachs's avatar
jostnachs
Icon for Helper IV rankHelper IV
2 years ago
Solved

Finding the match

Hi All,

I have two tables DimCommissionAgreements with Description3 column and DimCommissionAgreementsCriteria with Status COlumn. The two tables are connected with one to many relationship. Now, I want to compare the two columns and add a new column in DimCommissionAgreements table where if Description3 = Status then 0 else 1. But right now i have an issue as below.

even if the Description3 and Status is different it gives me 0.i have put the formula used below.

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,

    thanks for the soluition Greg_Deckler offered, and i want to offer some more information for user to refer to.

    hello jostnachs , you can consider to create a measure instead of calculated column.

    MEASURE =
    IF (
        MAX ( Sheet1[Description3] ) <> BLANK (),
        IF ( MAX ( Sheet1[Description3] ) = MAX ( 'Sheet1 (2)'[Status] ), 0, 1 )
    )
    

    Output

     

     

    Best Regards!

    Yolo Zhu

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

     

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    jostnachs Sorry, having trouble following, can you post sample data as text and expected output?
    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

        thanks for the soluition Greg_Deckler offered, and i want to offer some more information for user to refer to.

        hello jostnachs , you can consider to create a measure instead of calculated column.

        MEASURE =
        IF (
            MAX ( Sheet1[Description3] ) <> BLANK (),
            IF ( MAX ( Sheet1[Description3] ) = MAX ( 'Sheet1 (2)'[Status] ), 0, 1 )
        )
        

        Output

         

         

        Best Regards!

        Yolo Zhu

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