Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

DAX Product of Measure results

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.

 

 Relationship modelRelationship model

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

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



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

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

Stachu
Community Champion
Community Champion

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



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Worked like a charm, thanks Stachu!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.