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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

IF Formula based on another table with three criteria

all

I hope you can help?

 

I would like to add a column you table A using an IF formula which looks up three criterias in table B. To Give a YES or NO answer. I have tried the formula below and get a "Too few arguments were passed to the IF function. The minimum argument count for the function is 2." Error message

 

Thanking you in advance

 

Correct = IF(TableA[Name] = RELATED(TableB[Name]) && IF(TableA[REAL_TIME] >= RELATED(TableB[REAL_TIME - 3] ) && IF(TableA[REAL_TIME] <= RELATED(TableB[REAL_TIME + 3]), "YES" , "NO"
1 ACCEPTED SOLUTION
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

you can try the formula below:

Correct = IF(([Name] = RELATED(TableB[Name])) && ([REAL_TIME] >= RELATED(TableB[REAL_TIME - 3] )) && (TableA[REAL_TIME] <= RELATED(TableB[REAL_TIME + 3])), "YES" , "NO")

 

Let me know if it works

 

LC

Interested in Power BI templates? Check out my blog at www.finance-bi.com

View solution in original post

2 REPLIES 2
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

you can try the formula below:

Correct = IF(([Name] = RELATED(TableB[Name])) && ([REAL_TIME] >= RELATED(TableB[REAL_TIME - 3] )) && (TableA[REAL_TIME] <= RELATED(TableB[REAL_TIME + 3])), "YES" , "NO")

 

Let me know if it works

 

LC

Interested in Power BI templates? Check out my blog at www.finance-bi.com

Anonymous
Not applicable

Thank you. It worked a treat!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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