Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I need a measure that calculates the efficiency of a production plant. The plant produces products of different technologies, and the full production process is divided into steps called 'specs'.
The efficiency needs to be calculated for each technology and spec but the calculation is different.
The efficiency for each spec is calculated by the following formula: (SUM(MoveInQty)-SUM(Reject TotalQty)) / SUM(MoveInQty)
This works perfectly in a measure.
Now the difficult part is that the effiency of a technology is calculated by doing a product of each spec efficiency.
For example if I put a filter on technology 'ABC' and the efficiency of spec 1 = 50% and spec 1 = 25% (both of only products of technology ABC!) then the technology efficiency of ABC would be 12,5%.
Ideally I would do a product of the measure results like: Tech efficiency = PRODUCT([Spec efficiency])
Is this possible to do in DAX? Or maybe I need to change the data model? See the model below.
Solved! Go to Solution.
I'd try something like this (replace the red syntax with the relevant reference
PRODUCTX(ADDCOLUMNS(SUMMARIZE(Table,Table[Spec]),"Eff",[Spec efficiency]),[Eff])
the code calculates efficency per spec and then returns product of the calculation
Hi s041507
“For example if I put a filter on technology 'ABC' and the efficiency of spec 1 = 50% and spec 1 = 25% (both of only products of technology ABC!) then the technology efficiency of ABC would be 12,5%.”
<--- Could you share some related sample data of this example?
Regards,
Jimmy Tao
I'd try something like this (replace the red syntax with the relevant reference
PRODUCTX(ADDCOLUMNS(SUMMARIZE(Table,Table[Spec]),"Eff",[Spec efficiency]),[Eff])
the code calculates efficency per spec and then returns product of the calculation
Worked like a charm, thanks Stachu!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
139 | |
100 | |
95 | |
85 | |
63 |