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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Matski469
Frequent Visitor

Need to graph weekly yield by value

I have manufacturing data coming in that says whether a part is good, bad, or some category in between.  The data is item by item, so I'm trying to count the values.  What I can't seem to do is calculate a simple yield of x good/x total per week.  I can use the ALL () to get everything that I'm looking at, but that doesn't help.  I've tried ALL, ALLSELECTED, CALCULATE, FILTER, banging head against wall, etc.   

 

example of data is:

Week numberID numberCondition
311Good
312Bad
323Bad
324Good
325Good, except A

 

What I expect is:

Week 31 = 50% (1 good, 2 total)

Week 32 = 33% (1 good, 3 total)

 

And in a visual, I should be able to graph (line) the data by week and see it go from 50% to 33%, and then add in the "good, except A" value and see week 32  go to 67%.

 

Searching seems to get be close, but not there.  So I'm hoping someone can help.

 

1 ACCEPTED SOLUTION
ToddChitt
Super User
Super User

Try these measures:

My Count of Good = CALCULATE ( COUNTROWS(MyTable), [Condition] = "Good" )

Total Rows = COUNTROWS(MyTable)

Percent Good = DIVIDE( [My Count of Good], [Total Rows], 0 )

 

All those measures will respect the weekly slice when you plot.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
Matski469
Frequent Visitor

Thank you, that helped.  I've been spending a lot of time on the power query side, and am just now getting used to the DAX side.  Specifically getting used to measures.

ToddChitt
Super User
Super User

Try these measures:

My Count of Good = CALCULATE ( COUNTROWS(MyTable), [Condition] = "Good" )

Total Rows = COUNTROWS(MyTable)

Percent Good = DIVIDE( [My Count of Good], [Total Rows], 0 )

 

All those measures will respect the weekly slice when you plot.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors