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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
OSAMU
New Member

How to make formula of total step yield? (measure which is using the result of another measure)

Dear Community,

 

Need help from DAX experts!

 

I am strugged in DAX for calculating total step yield of processed product.

 

step n yield = sum(qty out@step n) / sum(qty in@step n)

total step yield = step1 yield x step2 yield x ... x stepN yield, or exp(sum(ln(step n yield)))

 

all of yield metircs have to be calcuated dynamically based on how user filters.

By product, by day, by any...

 

How can I make it happen???

 

20190315 Question for PBI community.PNG

 

 

DateProductStepin qtyout qty
1-JanP1S110099
1-JanP1S2110105
1-JanP2S15040
1-JanP2S26030
2-JanP1S15050
2-JanP2S1100100
2-JanP2S28075
2-JanP2S39050

 

measure

step yield = divide(sum(out qty),sum(in qty))

 

Regards,

Osamu

 

P.S. I don't have permission to upload sample pbix file...

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @OSAMU 

Create measures

Measure = CALCULATE(SUM(Sheet2[in]),FILTER(ALLSELECTED(Sheet2),Sheet2[step]=MAX(Sheet2[step])))

Measure 2 = CALCULATE(SUM(Sheet2[out]),FILTER(ALLSELECTED(Sheet2),Sheet2[step]=MAX(Sheet2[step])))

Measure 3 = [Measure 2]/[Measure]

Measure 4 = PRODUCTX(VALUES(Sheet2[step]),[Measure 3])

1.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @OSAMU 

Create measures

Measure = CALCULATE(SUM(Sheet2[in]),FILTER(ALLSELECTED(Sheet2),Sheet2[step]=MAX(Sheet2[step])))

Measure 2 = CALCULATE(SUM(Sheet2[out]),FILTER(ALLSELECTED(Sheet2),Sheet2[step]=MAX(Sheet2[step])))

Measure 3 = [Measure 2]/[Measure]

Measure 4 = PRODUCTX(VALUES(Sheet2[step]),[Measure 3])

1.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Maggie,

 

How wonderful this measure is!!!

You solved my headache for last seveal months.

 

Thank you,

Osamu

Dear Magge and experts

 

One more help I need.

Your solution is working fine for showing single value view like a CARD.

How can I extend your solution to show the total step yield value by date hierarchy (such as yield trend by date/week/month/quarter by line chart)? 

Because measure formula ignores date, and the total step yield value by date hierarchy is shown wrongly.

 

Best regards,

Osamu

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors