I have a problem in PowerBi that i can’t fix.
Building a production report with movement from production line A to production line B
The data set only shows the movement from line A with a specific product ID.
So the negative movement is calculated through a measure, but I cant fix the positive movement on line B.
Underneath is the negative movement. But in this case if product_id = 7 and production_line = 1, the weight is only deducted from production_line = 1 but should also be added to production_line = 2.
Is there someone who can help me out? Big thanks!
Movement =
VAR prof = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 7)
VAR airco = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 11)
VAR NH3 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 12)
VAR WPD = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 13)
VAR lda = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 14)
VAR airco2 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 24)
VAR nh32 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 25)
VAR lda2 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 27)
VAR wpd2 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 29)
VAR fridge = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 35)
VAR airco3 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 36)
VAR prof2 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 43)
VAR wpd3 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 44)
VAR airco4 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 48)
VAR prof3 = CALCULATE(SUM(order_product[count]) * SUM(product_gewicht[default_weight]), product_gewicht[product_id] = 49)
RETURN
CALCULATE(prof + airco + NH3 + wpd + lda +airco2 +nh32 +lda2 + wpd2 + fridge + airco3 + prof2 + wpd3 + airco4 +prof3)
Already tried to duplicate the data and replace the values, but it is not in 1 table so this is not working. Main problem are the slicers because I slice on production_line
4Ramons is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1