Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello I have an issue, which to abstract looks a bit like this:
Table 1: Inventory
| ID | Item | Value |
1 | TV | £30 |
| 2 | TV | £40 |
| 3 | TV | £90 |
| 4 | Radio | £5 |
| 5 | Radio | £10 |
Table2: InsuranceProduct
| Name | ProdType | MaxValue |
| TVOne | TV | £50 |
| TVTwo | TV | £100 |
| RadioOne | Radio | £8 |
| RadioTwo | Radio | £16 |
I want to merge these two queries so I can add a column to the Inventory table with the relevant insurance product name, i.e.:
| ID | Item | Value | Insurance.Name |
1 | TV | £30 | TVOne |
| 2 | TV | £40 | TVOne |
| 3 | TV | £90 | TVTwo |
| 4 | Radio | £5 | RadioOne |
| 5 | Radio | £10 | RadioTwo |
I.e. in other words I want to look up a value in one table ([InsuranceProduct]"Name"), by matching on the value of one column ([Inventory]"Item" and [InsuranceProduct]"ProdType"), and finding the smallest value in [insuranceProduct]"MaxValue" that is greater than [Inventory]"Value"
I hope that makes sense!
=let a=Table.Group(InsuranceProduct,"ProdType",{"n",each Table.Sort(_,"MaxValue")}) in Table.AddColumn(Inventory,"InsuranceName",each let b=a{[ProdType=[Item]]}?[n]? in if b=null then null else Table.Skip(b,(x)=>x[MaxValue]<[Value]){0}?[Name]?)
This seems to throw a cyclic reference error?
it works well on my PC
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |