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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
blaferriere
Frequent Visitor

IF Statement between two tables greater than OR less than

So I have two tables that have a relationship with each other. I am trying to narrow down my results based on a given price range from low to high.

 

Table 1 - Opportunities

Compatibility = A

Low Est. Value = 97,500

High Est. Value = 162,500

 

Table 2 - Items

Compatibility = A

Asking Price = 109,000

 

My validation would be either 1(true) or 0(false).

 

I basically want to remove all the other values that don't fall in range with the other tables asking prices. 

 

Any help would be greatly appreciated!

 

Thank you

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @blaferriere ,

 

To create a calculated column as below.

Column = 
IF (
    'Table 2 - Items'[Asking Price]
        <= MAX ( 'Table 1 - Opportunities'[High Est. Value] )
        && 'Table 2 - Items'[Asking Price]
            >= MAX ( 'Table 1 - Opportunities'[Low Est. Value] ),
    1,
    0
)

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @blaferriere ,

 

To create a calculated column as below.

Column = 
IF (
    'Table 2 - Items'[Asking Price]
        <= MAX ( 'Table 1 - Opportunities'[High Est. Value] )
        && 'Table 2 - Items'[Asking Price]
            >= MAX ( 'Table 1 - Opportunities'[Low Est. Value] ),
    1,
    0
)

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Iamnvt
Continued Contributor
Continued Contributor

hi,

 

you can try this calculated column:

Calculated Column = IF(RELATED('Item'[Asking Price]) < Opportunity[Highest] && RELATED('Item'[Asking Price]) > Opportunity[Lowest], 1,0)

or this measure:

Measure = 
VAR
selecteditem = SELECTEDVALUE('Item'[Compability])
VAR
high = MAX(Opportunity[Highest])
VAR
low = MIN(Opportunity[Lowest])
RETURN
IF(SUM('Item'[Asking Price]) > low && SUM('Item'[Asking Price]) < high, 1,0)

here is the PBI file:

https://1drv.ms/u/s!Aps8poidQa5zk6pzIHivHVrfmXigAw

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors