Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
KBO
Memorable Member
Memorable Member

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 :).

Compare.png

 

Thank you.

Best,

Kathrin

2 ACCEPTED SOLUTIONS

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.

 

 

CompareA+B.png

 

View solution in original post

v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @KBO ,

You may refer to below formula:

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

Result:

1.PNG

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @KBO ,

Could you please post some simple sample data and your desired result to have a test if possible?

You could 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

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

 

 

CompareA+B.png

 

v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @KBO ,

You may refer to below formula:

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

Result:

1.PNG

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you 🙂

parry2k
Super User
Super User

@KBO does these two tables has any relationship?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

KBO
Memorable Member
Memorable Member

Yes they have 🙂

Column A - Many

Column B - One

 

And not bidirectonal only one way from one to many

@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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.