Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone. I have data that looks like this:
| TestCaseID | Configuration | RunDate |
| 1 | 1 | 08-04-2021 11:10:10 |
| 1 | 1 | 08-04-2021 12:10:10 |
| 1 | 2 | 08-04-2021 13:10:10 |
| 2 | 1 | 08-04-2021 08:08:08 |
| 2 | 2 | 08-04-2021 09:09:09 |
| 2 | 2 | 08-04-2021 10:10:10 |
| 3 | 1 | 08-04-2021 09:09:09 |
| 3 | 1 | 08-04-2021 11:11:11 |
| 3 | 2 | 08-04-2021 10:10:10 |
I have a table in my PBI report where the user can select test cases, and whatever configurations they want through slicers. I want the table to only display the latest test run within the configuration.
So I ideally would create a calculated column that checks whether the current test/configuration is the last one for the configuration. The data output should look something like this:
| TestCaseID | Configuration | RunDate | FilterCheck |
| 1 | 1 | 08-04-2021 11:10:10 | Remove |
| 1 | 1 | 08-04-2021 12:10:10 | Keep |
| 1 | 2 | 08-04-2021 13:10:10 | Keep |
| 2 | 1 | 08-04-2021 08:08:08 | Keep |
| 2 | 2 | 08-04-2021 09:09:09 | Remove |
| 2 | 2 | 08-04-2021 10:10:10 | Keep |
| 3 | 1 | 08-04-2021 09:09:09 | Remove |
| 3 | 1 | 08-04-2021 11:11:11 | Keep |
| 3 | 2 | 08-04-2021 10:10:10 | Keep |
This is the code I have so far:
Solved! Go to Solution.
Hi, @KasperBI
Please correct me if I wrongly understood your question.
Please check the below Calculated Column and the link down below, which is the sample pbix file.
Latest Test Column =
VAR lastnonblankcheck =
CALCULATE (
LASTNONBLANK ( 'Test Results'[RunDate], MAX ( 'Test Results'[Configuration] ) ),
ALLEXCEPT (
'Test Results',
'Test Results'[TestCaseID],
'Test Results'[Configuration]
)
)
RETURN
IF ( 'Test Results'[RunDate] = lastnonblankcheck, "Keep", "Remove" )
https://www.dropbox.com/s/xxpqyuj3xk6l2or/KasperBI.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @KasperBI
Please correct me if I wrongly understood your question.
Please check the below Calculated Column and the link down below, which is the sample pbix file.
Latest Test Column =
VAR lastnonblankcheck =
CALCULATE (
LASTNONBLANK ( 'Test Results'[RunDate], MAX ( 'Test Results'[Configuration] ) ),
ALLEXCEPT (
'Test Results',
'Test Results'[TestCaseID],
'Test Results'[Configuration]
)
)
RETURN
IF ( 'Test Results'[RunDate] = lastnonblankcheck, "Keep", "Remove" )
https://www.dropbox.com/s/xxpqyuj3xk6l2or/KasperBI.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Thank you so much, that does seem to work.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 64 | |
| 47 | |
| 41 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 185 | |
| 123 | |
| 106 | |
| 78 | |
| 52 |