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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
tgjones43
Helper IV
Helper IV

Adding extra condition to IF function with RELATED

Hi all

 

I am using the following DAX formula to check whether a value in Table 1 exceeds a set threshold, given in Table 2. This works fine, but I want to include an additional step to only say Yes if the Sign (from Table 1) is - rather then <. Current and Desired results shown in table 1, so the 2nd row should be No. Please can anyone help?

 

Column = IF(RELATED('Table 1'[Value])>'Table 2'[Threshold],"Yes","No")
 
Parameter codeValueSignCurrent resultDesired result
A5-YesYes
A5<YesNo

 

Parameter codeThreshold
A3
1 ACCEPTED SOLUTION
MS_Sum
Frequent Visitor

Hi @tgjones43 ,

 

Try the DAX formula stated below whether it works for you.

Column =
IF(
    'Table 1'[Sign] = "-",
    IF(
        'Table 1'[Value] > LOOKUPVALUE('Table 2'[Threshold], 'Table 2'[Parameter code], 'Table 1'[Parameter code]),
        "Yes",
        "No"
    ),
    "No"
)
 
The above one checks for the "-" sign. If it is, it checks if the value in Table 1 is greater than the threshold value in Table 2 that matches the parameter code in Table 1. If it is, then  returns "Yes", otherwise it returns "No". If the sign in Table 1 is not "-", it returns "No". 
 
Hope this might help you.

View solution in original post

2 REPLIES 2
MS_Sum
Frequent Visitor

Hi @tgjones43 ,

 

Try the DAX formula stated below whether it works for you.

Column =
IF(
    'Table 1'[Sign] = "-",
    IF(
        'Table 1'[Value] > LOOKUPVALUE('Table 2'[Threshold], 'Table 2'[Parameter code], 'Table 1'[Parameter code]),
        "Yes",
        "No"
    ),
    "No"
)
 
The above one checks for the "-" sign. If it is, it checks if the value in Table 1 is greater than the threshold value in Table 2 that matches the parameter code in Table 1. If it is, then  returns "Yes", otherwise it returns "No". If the sign in Table 1 is not "-", it returns "No". 
 
Hope this might help you.

Hi @MS_Sum this works perfectly, thank you!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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