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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sivarajan21
Post Prodigy
Post Prodigy

Creating Logic to find whether columns in one table matches other columns in other table

Hi Team,

 

I have 2 tables:

Door table as below:

sivarajan21_1-1739809528105.png

 

 

Store Status table as below:

sivarajan21_0-1739809470771.png

 

They are modelled as below(let me know if we can better model it-suggestions are welcomed):

sivarajan21_2-1739809845869.png

 

Now, I need to create a logic(Breach) to find when Door Table - Status column being Open when Store Status table - Status column being Closed (indicated by - 'C').

During this logic, we have to make sure it satisfies below conditions:

  • DateTime column of Store Status table should match the createdon column of Door table
  • Store id column of Store Status table should match the siteid of Door table

Output should return 1 if the conditions meets else 0.

 

Could you please help me create a logic for this?

PFA file here B&M.pbix

 

Thanks in advance!

@marcorusso @tharunkumarRTK @Ahmedx @Greg_Deckler @dufoq3 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Wouldn't this data model make more sense?

 

lbendlin_0-1739829699029.png

 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

Wouldn't this data model make more sense?

 

lbendlin_0-1739829699029.png

 

Hi,

 

 I have closed this query as there was no further progress.

 

thanks

Hi @lbendlin Sir,

 

Thanks for your quick response!

Is it possible to achieve the logic(Breach) which i described above using this model?

sivarajan21_0-1739862807863.png

 

Many thanks in advance!

@lbendlin @marcorusso @tharunkumarRTK @dufoq3 @Ahmedx 

Hi @sivarajan21, do not tag me in every single post please. Thank you.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.