Forum Discussion
Anonymous
5 years agoNot applicable
First pass yield???
Hello everyone, I need help from you at how can I get the % pass that occurred the first time for each ID? Considering all the fields in the table. ID Last Transaction Result Start t...
- Anonymous5 years ago
// T is the table from your post... [Pass 1st Time (%)] = var IDsWithEarliestDates = // First, get for all visible ID's // their minimum start times VISIBLE // in the current context(!!!). ADDCOLUMNS( DISTINCT( T[ID] ), "@MinStartTime", CALCULATE( MIN( T[Start Time] ) ) ) var CountOfIDsWherePassIsFirst = // Calculate the number of ID's // where the result for the first // visible date, as calculated above, // is "pass." CALCULATE( DISTINCTCOUNT( T[ID] ), TREATAS( IDsWithEarliestDates, T[ID], T[Start Time] ), KEEPFILTERS( T[Result] = "Pass" ) ) var CountOfAllVisibleIDs = // Get the number of all visible ID's. DISTINCTCOUNT( T[ID] ) var Result = DIVIDE( CountOfIDsWherePassIsFirst, CountOfAllVisibleIDs ) RETURN ResultBe careful - this formula is sensitive to all filters you put on the table, meaning it respects them all, so the calculation above is carried out within the visible set of ID's with all the restricting filters.
amitchandak
5 years agoSuper User
Anonymous two )) should close after allexcept
check formula again
divide(calculate(countrows(Table), filter(Table, Table[Date] = calculate(Min(Table[Date]),allexpect(Table, Table[ID])) && Table[Result] ="Pass")),calculate(countrows(Table),Table[Result] ="Pass"))
Anonymous
5 years agoNot applicable
but the result has to be: pass:36, fail: 19 so yield=65%