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! It's time to submit your entry. Live now!
Hi guys,
Hope you can help me out.
I have 2 tables
Productconfig
Opportunity
Connection
Now, I'd like to add an additional column in Productconfig Table with the Quantity of the Product from the Previous Opportunity.
Any idea?
Solved! Go to Solution.
HI @Omelei ,
You can create a column as below:-
Column =
LOOKUPVALUE (
Opportunity[prev opp id],
Opportunity[Opp id], OpportunityConfig[opportunity id]
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Omelei ,
Please try to create a new column with below dax formula:
Column =
VAR cur_oid = [Opportunity ID]
VAR o_id =
CALCULATE (
MAX ( Opportunity[Previous Opportunity ID] ),
Opportunity[Opportunity ID] = cur_oid
)
VAR cur_pid = [Product ID]
VAR _val =
CALCULATE (
MAX ( Productconfig[Quantity] ),
FILTER (
ALL ( Productconfig ),
[Product ID] = cur_pid
&& [Opportunity ID] = o_id
)
)
RETURN
_val
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Omelei ,
Please try to create a new column with below dax formula:
Column =
VAR cur_oid = [Opportunity ID]
VAR o_id =
CALCULATE (
MAX ( Opportunity[Previous Opportunity ID] ),
Opportunity[Opportunity ID] = cur_oid
)
VAR cur_pid = [Product ID]
VAR _val =
CALCULATE (
MAX ( Productconfig[Quantity] ),
FILTER (
ALL ( Productconfig ),
[Product ID] = cur_pid
&& [Opportunity ID] = o_id
)
)
RETURN
_val
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HI @Omelei ,
You can create a column as below:-
Column =
LOOKUPVALUE (
Opportunity[prev opp id],
Opportunity[Opp id], OpportunityConfig[opportunity id]
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thank you for your reply @Samarth_18 . There can be multiple products in 1 opportunity.
I made a start now with the concatenate function:
opportunityid + productid
previous opportunityid + product id
Now I need to add another column with the quantity of the product in the previous opportunity. I tried to use the following:
Column = LOOKUPVALUE(Quantity,Merge Opportunity + ProductID,Merge Previous Opportunity + ProductID)
However, LOOKUPVALUE does not work with expressions.
Any thoughts?
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 129 | |
| 104 | |
| 56 | |
| 39 | |
| 31 |