Forum Discussion
Dbjerring
9 years agoRegular Visitor
Remove duplicates based on values from multiple cells
Hi Community, We have dataset based on logs - here we would like to create a new column with a true/false value if the line is a duplicate. We have UserID, LogTimeDate, LogTime, and number of lo...
- 9 years ago
You could modify the formula as shown below.
IsDuplicate = IF ( COUNTROWS ( FILTER ( Logs, Logs[LogCNumber] = EARLIER ( Logs[LogCNumber] ) && Logs[LogTime.1] = EARLIER ( Logs[LogTime.1] ) && Logs[LogID] < EARLIER ( Logs[LogID] ) ) ) > 0, TRUE (), FALSE () )
Dbjerring
9 years agoRegular Visitor
Anonymous - I don't need to remove them, I have to tag them. And since it's based on values from two different cells, the remove duplicate function isn't enough. Thank you for your elaboration though.
Good day to you sir
Anonymous
9 years agoNot applicable
- Dbjerring9 years agoRegular Visitor
Anonymous - No, I still hope he'll reply.
Do you have any inputs?
- Anonymous9 years agoNot applicable
Yea I have a solution in mind. Could you create a sample dataset with 5 rows? I'd like to test it before suggesting it.
- Dbjerring9 years agoRegular Visitor
Anonymous - The dataset:
LogID LogCNumber LogTime.1 LogCount IsDuplicate 2 1234567 20-06-2017 FALSE 3 1172690 20-06-2017 FALSE 4 21-06-2017 -1 FALSE 5 1145243 21-06-2017 72 TRUE 6 1145243 21-06-2017 72 TRUE 7 1145243 21-06-2017 72 TRUE 8 1172690 28-06-2017 94 FALSE 9 1172690 30-06-2017 55 FALSE 10 1145243 07-07-2017 115 TRUE 11 1145243 07-07-2017 115 TRUE 12 297458 12-07-2017 33 FALSE 13 1061571 13-07-2017 163 FALSE 14 338873 13-07-2017 14 FALSE 15 469736 13-07-2017 9 FALSE 16 1166818 13-07-2017 148 FALSE 17 1107245 13-07-2017 24 TRUE 18 1107245 13-07-2017 24 TRUE 19 1165369 13-07-2017 51 FALSE 20 1117867 13-07-2017 22 FALSE Thank you
- v-chuncz-msft9 years agoCommunity Support