Forum Discussion
First pass yield???
- 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.
Anonymous , try a measure like
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"))
Hello, this is my result:
- amitchandak5 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"))
- Anonymous5 years agoNot applicable
but the result has to be: pass:36, fail: 19 so yield=65%