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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have 3 tables: Query1 at Product and Invoice Level; Stock_KLG at Product Level; and DimProduct at Product Level
Query1 has an old Product code and Stock_KLG a new Product code. They are connected to one another by a mapping table DimProducts.
I want to create a calculated column [Stock_KLG]Quantity * Average( [Query1]Unit_Cost )
I tried with related and allexcept, but because of a 3'rd table it doesn't work.
Thank you!
Solved! Go to Solution.
which is the 3rd table?
if you are adding a calculated column in DimProducts, can try this code
NewColumn=SUMX(RELATEDTABLE(Stock_KLG,Stock_KLG]Quantity)*AVERAGEX(RELATEDTABLE(Query1,Query1[Unit_Cost])
which is the 3rd table?
if you are adding a calculated column in DimProducts, can try this code
NewColumn=SUMX(RELATEDTABLE(Stock_KLG,Stock_KLG]Quantity)*AVERAGEX(RELATEDTABLE(Query1,Query1[Unit_Cost])
Great. Looks like it works in this form:
[Stock_KLG]Quantity * AVERAGEX(RELATEDTABLE(Query1,Query1[Unit_Cost])
Thank you!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 20 | |
| 20 | |
| 14 | |
| 14 |