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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
sivarajan21
Post Partisan
Post Partisan

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors