Forum Discussion
Help on measure formula
- 8 years ago
Another approach that woudl work even If you don't have the date field suggested by jthomson.
You could staging tables of serial numbers that have passed and failed using summarize with filters to capure only passing adn failing NS's respectively and include other calculated or relevant columns as needed,
Passing SN = CALCULATETABLE(SUMMARIZE('StationEventHist',StationEventHist[PartSerialNbr]),'StationEventHist[EventID]<>65)
Reject SN = CALCULATETABLE(SUMMARIZE('StationEventHist',StationEventHist[PartSerialNbr]),'StationEventHist[EventID]<>105)
Then update you mesures to calculate form these tables and join the tables in your model by SN so any other filters you apply would work correctly.
There's a few ways you could look at this depending on how exactly your data model works - if each SN can only pass once, you could do a distinct count of all the serial numbers, then do a count of the number of rows that have a result of pass and take one from the other, or if there's some sort of date/time field with each row, you could play with filters to just look at the most recent instance for any given SN (should be easy to search for the correct syntax)
- Seward125338 years agoSolution Sage
Another approach that woudl work even If you don't have the date field suggested by jthomson.
You could staging tables of serial numbers that have passed and failed using summarize with filters to capure only passing adn failing NS's respectively and include other calculated or relevant columns as needed,
Passing SN = CALCULATETABLE(SUMMARIZE('StationEventHist',StationEventHist[PartSerialNbr]),'StationEventHist[EventID]<>65)
Reject SN = CALCULATETABLE(SUMMARIZE('StationEventHist',StationEventHist[PartSerialNbr]),'StationEventHist[EventID]<>105)
Then update you mesures to calculate form these tables and join the tables in your model by SN so any other filters you apply would work correctly.