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
dpotta
Resolver I
Resolver I

Please can someone help here, I am going bananas

I have two tables

 

1) tblSelection - this only has one row of data

2) tblMatches - this has 4m rows of data

 

They are joined in a one:many by a field named referenceNumber. Both tables have identical columns

 

There is a column in both tables called AgeOfCompany. All I want to do is add a column to tblMatches where:

 

IF (AND(tblMatches[AgeOfCompany] >= tblSelection[AgeOf Company] *0.8 , tblMatches tblMatches[AgeOfCompany] ,<= tblSelection[AgeOf Company] *1.2) then 1 else 0

 

I am lost as how to do this. If you can help, please do! Obviously, as they are joined, I can only get a 1 in the linked record

 

1 REPLY 1
HotChilli
Super User
Super User

I can see you are frustrated.

Next time , please provide a (small) data sample.

 

The column will probably look like this:

ColumnS = IF 
(AND
 (tblMatches[AgeOfCompany] >= RELATED(tblSelection[AgeOfCompany]) *0.8 ,
  tblMatches[AgeOfCompany] <= RELATED(tblSelection[AgeOfCompany]) *1.2),
   1 , 0)

 Please test at your side.

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors