Forum Discussion
macemit
7 years agoFrequent Visitor
Failure rate running total based on counted fields
Hi, I'm trying to calculate a running total of a count of product failures over a count of products shipped: Count of Failures Count of Shipped Wrong Correct Methodology June 1 ...
Interkoubess
Solution Sage
7 years agoHi macemit,
I changed the field names ( to Shipped and Failed) and table name ( Table) and I created a date ( first date of every month) and finally created this measure:
Per = var CounFail = CALCULATE(SUM('Table'[ Failures]),FILTER(ALL('Table'[Date]),'Table'[Date]<=MAX('Table'[Date]))) var CounShip = CALCULATE(SUM('Table'[Shipped]),FILTER(ALL('Table'[Date]),'Table'[Date]<=MAX('Table'[Date]))) return DIVIDE(CounFail,CounShip,BLANK())
Hope it helps....
Ninter
- macemit7 years agoFrequent Visitor
Thanks for that. I was away from the office for a couple days hence the delay responding. Question: can I use counta instead of sum, as the fields are text and cannot be summed.
And 1 issue: serial number and failures came from 2 different tables. Is this how your measure is calculating? I'm getting a 'syntax for 'return' is incorrect'
Thanks.