Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
If this post helps, then please consider accepting 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.
If this post helps, then please consider accepting 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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |