March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have two tables.
Table A looks like this:
Number | RangeFrom | RangeTo |
1 | 17000 | 17999 |
2 | 18000 | 18999 |
Table B looks like this:
Number | Name |
17001 | Tom |
17002 | Michael |
19000 | Brad |
I want to create a calculated column in Table B that checks for each number to see if it is in the range and if so, returns a 1.
For 17001 and 17002 1 should be returned, for 19000 a 0.
Currently my calculation looks like this.
if(Table_B[Number]>=related(Table_A[RangeFrom]) && Table_B[Number]<=related(Table_A[RangeTo]) ,1,0)
Thank you for help!
Solved! Go to Solution.
Hi @Anonymous
Please use
=
MAXX (
FILTER (
'Table A',
'Table B'[Number] >= 'Table A'[RangeFrom]
&& 'Table B'[Number] <= 'Table A'[RangeTo]
),
'Table B'[Name]
)
Hi @Anonymous
Please use
=
MAXX (
FILTER (
'Table A',
'Table B'[Number] >= 'Table A'[RangeFrom]
&& 'Table B'[Number] <= 'Table A'[RangeTo]
),
'Table B'[Name]
)
Great answer thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |