Forum Discussion

KBO's avatar
KBO
Memorable Member
7 years ago
Solved

Comparing two colums

Hi together,

I think the solution is simple but I don't finde a fitting solution for me. So my question is there any DAX Query which shows me If in Column A and Column B is any value. It dosen't matter if the values matching - my only wish is to show there are values in Column A and in Column B. The Columns are also in two different Tables. For the result insted of "0" and "1" is also yes/no ok or whatever :).

 

Thank you.

Best,

Kathrin

  • KBO's avatar
    KBO
    7 years ago

    Hi Daniel,

    Sorry the real data I can't share. That's the reason why I postet the picture above :) is this not informative enough? I can send you this excel but I think it would be easy to copy it directly into Power BI?

    May be I explain it not datailed enough:

    1) I have two columns (Column A, Colum B) which are not completly filled with data

    2) I try to find out if there is a value in Column A and B (which value dosen't matter) in the same line

    3) If this is the case than I would like to have a calculated column with the value "1" for yes there is a value and a "0" for there is not.

     

     

     

  • Hi KBO ,

    You may refer to below formula:

    Result = IF(OR(ISBLANK([Column1]),ISBLANK([Column2]))=TRUE(),0,1)

    Result:

    Regards,

    Daniel He

7 Replies

    • KBO's avatar
      KBO
      Memorable Member

      Yes they have :)

      Column A - Many

      Column B - One

       

      And not bidirectonal only one way from one to many

      • parry2k's avatar
        parry2k
        Super User

        KBO ok you have to provide more details, not yes or no answers :) Is it one to one relationship, one to many, relationship diagram will help

    • KBO's avatar
      KBO
      Memorable Member

      Hi Daniel,

      Sorry the real data I can't share. That's the reason why I postet the picture above :) is this not informative enough? I can send you this excel but I think it would be easy to copy it directly into Power BI?

      May be I explain it not datailed enough:

      1) I have two columns (Column A, Colum B) which are not completly filled with data

      2) I try to find out if there is a value in Column A and B (which value dosen't matter) in the same line

      3) If this is the case than I would like to have a calculated column with the value "1" for yes there is a value and a "0" for there is not.

       

       

       

      • v-danhe-msft's avatar
        v-danhe-msft
        Microsoft Employee

        Hi KBO ,

        You may refer to below formula:

        Result = IF(OR(ISBLANK([Column1]),ISBLANK([Column2]))=TRUE(),0,1)

        Result:

        Regards,

        Daniel He