This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I am new to power BI and cannot get this to work:
I have a table: Customer ID | Customer | Value | Level - the first three are populated and the last needs to be populated lookup in another table: Level | From | To - meaning the if the Value from first table is between From and To in the second table the Level should be set. Is that doable?
Solved! Go to Solution.
You can filter your second table for each row on the first table, if the result of filtering is a single row, you can use any expressions with "first" or "last" to get this row.
Try this formula on CustomerTable[Level]:
Customer Level = CALCULATE( LASTNONBLANK('LevelTable'[Level];1)
; FILTER( 'LevelTable';'LevelTable'[From]= CALCULATE(
LASTNONBLANK('LevelTable'[From];1)
;FILTER('LevelTable';'LevelTable'[From]<= 'CustomerTable'[Value]
&& 'LevelTable'[To]>='CustomerTable'[Value]))))
You can filter your second table for each row on the first table, if the result of filtering is a single row, you can use any expressions with "first" or "last" to get this row.
Try this formula on CustomerTable[Level]:
Customer Level = CALCULATE( LASTNONBLANK('LevelTable'[Level];1)
; FILTER( 'LevelTable';'LevelTable'[From]= CALCULATE(
LASTNONBLANK('LevelTable'[From];1)
;FILTER('LevelTable';'LevelTable'[From]<= 'CustomerTable'[Value]
&& 'LevelTable'[To]>='CustomerTable'[Value]))))
Worked perfect, thank you 🙂
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 41 | |
| 21 | |
| 19 |