Forum Discussion
ddijstelbloem
2 years agoFrequent Visitor
Making a calculation based on data in three related tables
I have 3 different tables: T_Part T_FC T_BillofOper T_FC and T_BillofOper are both related to T_Part by column PartCode In table T_FC I have a column named Qty In table T_BillofOper I ...
- 2 years ago
Check whether this measure is helping or not,
PartCode X = VAR _tempTable = SUMMARIZE ( T_Part, T_Part[PartCode], "@QTY", SUM ( T_FC[Aantal] ), "@BatchQty", SUM ( T_Part[CalComputQty] ), "@Hrs", SUM ( T_BillofOper[LineNr] ) ) VAR _result = SUMX ( _tempTable, DIVIDE ( [@QTY], [@BatchQty] ) * [@Hrs] ) RETURN IF ( ISBLANK ( _result ), 0, _result )
Arul
2 years agoSuper User
Could you provide atleast three rows of sample data for all 3 tables?
ddijstelbloem
2 years agoFrequent Visitor
Aantal = Qty
CalcComputQty = BatchQty
Aantal = Qty
- Arul2 years agoSuper User
Check whether this measure is helping or not,
PartCode X = VAR _tempTable = SUMMARIZE ( T_Part, T_Part[PartCode], "@QTY", SUM ( T_FC[Aantal] ), "@BatchQty", SUM ( T_Part[CalComputQty] ), "@Hrs", SUM ( T_BillofOper[LineNr] ) ) VAR _result = SUMX ( _tempTable, DIVIDE ( [@QTY], [@BatchQty] ) * [@Hrs] ) RETURN IF ( ISBLANK ( _result ), 0, _result )- ddijstelbloem2 years agoFrequent Visitor
Thanks! After some small adjustments with the right colums it works!