Forum Discussion
vincentakatoh
8 years agoHelper IV
DAX: Testresult within first 60mins
Hi, Need help on DAX to determine the latest TestResult within the first 60mins (highlighted in yellow). Sample data as below. Sample table (Final TestResults may or maynot exceed 60mins) ...
- 8 years ago
Hi vincentakatoh,
Please create calculated columns using the formula below.duration = IF ( DATEDIFF ( Data[TestTimeFr], Data[TestTime_TC1], MINUTE ) < 60, 1, 0 ) latest TestResult within the first 60mins = CALCULATE ( MAX ( Data[TestTime_TC1] ), FILTER ( Data, Data[duration] ) )
You will get the following expected result.
Best Regards,
Angelia
v-huizhn-msft
8 years agoMicrosoft Employee
Hi vincentakatoh,
Please create calculated columns using the formula below.
duration = IF ( DATEDIFF ( Data[TestTimeFr], Data[TestTime_TC1], MINUTE ) < 60, 1, 0 ) latest TestResult within the first 60mins = CALCULATE ( MAX ( Data[TestTime_TC1] ), FILTER ( Data, Data[duration] ) )
You will get the following expected result.
Best Regards,
Angelia
vincentakatoh
8 years agoHelper IV
Hi v-huizhn-msft,
Thanks. Works pefectly on my actual data. I'm only able to do so much with PowerBI because all the great folks in this forum.
Super Kudos!