Forum Discussion
Anonymous
3 years agoNot applicable
Calculation Involving Duplicates
Without deleting duplicates, how do I write a formula to calculate the total scrap percentage by date? Scrap% = (Machine Scrap/(Machine Scrap + Good Quantity)) * 100 Production Day Machin...
Anonymous
3 years agoNot applicable
It's my fault I wasn't clear with what I was trying to ask. What I want to do is use the first instances of the scrap and the good, but I think that I will have to create a new column to flag first instances.
lbendlin
3 years agoSuper User
Not necessarily. If you do a Table.Distinct in Power Query across only one column it will result in the "first" column being grabbed and everything else being dropped.
If you want to do this in DAX you can abuse TOPN(1, ) in a similar way but it will be even less deterministic.
Please show the expected outcome based on the sample data you provided.