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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have 2 tables, Accounts and Info.
Accounts Table looks like this, only with millions of rows:
From | To | Account Type |
100156 | 120211 | ABC Account |
432215 | 554532 | XYZ Account |
And Info Table looks like this, only with millions of rows:
Irrevelant Columns for this question | Account |
irrelevant data for this question | 113456 |
irrelevant data for this question | 498777 |
I need to append 'Account Type' column from 'Accounts' table, over to 'Info Table' based on the values of 'From' and 'To'.
Therefore obtaining this:
Ideal Info Table
Irrevelant Columns for this question | Account | Account Type |
irrelevant data for this question | 113456 | ABC Account |
irrelevant data for this question | 498777 | XYZ Account |
How can I do this?
Try this calculated column in the Info table:
Account Type =
VAR vAccount = Info[Account]
VAR vResult =
MAXX (
FILTER ( Accounts, vAccount >= Accounts[From] && vAccount <= Accounts[To] ),
Accounts[Account Type]
)
RETURN
vResult
Proud to be a Super User!
Hi @DataInsights !
It only mapped the last one of the Account Types. For example, out of account types ABC, DEF and XYZ, it only mapped the accounts of type 'XYZ', all the rest of the column were left blank.
Would you be able to provide examples? You can paste the data as a table or use a file service like OneDrive.
Proud to be a Super User!