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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have 2 tables
table 1
table 2
I try to create a conditinal column for table 2
<= 30 = If table1[Aging] <= 30 then Sale else 0
>30 = If table1[Aging] > 30 then Sale else 0
Thank you for your help!
Please try the following:
If (table1[Aging])<= 30 ,[Sale],0)
If (table1[Aging] > 30,[Sale],0)
@Harry_Tran - It looks like Solved: Re: How to lookup values in another table in the Q... - Microsoft Power BI Community does the trick for you.
= Table.AddColumn(#"Changed Type", "<=30", each if (let currentID = [ID] in Table.SelectRows(#"table 1", each [ID] = currentID)){0}[Aging] <= 30 then [Sale] else 0)
= Table.AddColumn(#"Added Custom", ">30", each if (let currentID = [ID] in Table.SelectRows(#"table 1", each [ID] = currentID)){0}[Aging] > 30 then [Sale] else 0)
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |