Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
How can I return a value from Table B based on the account number in Table A being between a range set in Table B.
Table A:
Table B:
I want to create a column in Table A returnining values from the "Class" column in Table B based on the account number from Table A falling in the range of Table B's "SEG 3 BEgin" and "SEG 3 End". For example, I want the value "Operating Expense" returned for a Table A account "4005".
Hi @justinblackmor -
Try creating a column on Table A with this kind of DAX pattern
Class =
VAR __ThisRow = TableA[Account]
VAR __minAcc =
MAXX (
FILTER (
ALL ( TableB ),
__ThisRow >= TableB[SEG3 Begin]
&& __ThisRow <= TableB[SEG 3 End]
),
TableB[SEG 3 Begin]
)
VAR __maxAcc =
MINX (
FILTER (
ALL ( TableB ),
__ThisRow >= TableB[Seg 3 Begin]
&& __ThisRow <= TableB[Seg 3 End]
),
TableB[Seg 3 End]
)
RETURN
LOOKUPVALUE (
TableB[Class],
TableB[Seg 3 End], __maxAcc,
TableB[Seg 3 Begin], __minAcc
)
Hope this helps
David
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
8 |