Forum Discussion
Duplicate search in table
Trying to find a solution for this below requirement
Have a Purchasing table with the purchase details. Need to identify the duplicates based on the criteria
- Vendor and Planned recept date is in 5 days of the selected date( Slicer value ) and amount < = 1500
| Vendor | Purch Ord | Planned Rcpt Date | Amount |
| 10 | 20001 | 3/7/2023 | 1500 |
| 20 | 20002 | 3/7/2023 | 100 |
| 10 | 20003 | 7/7/2023 | 1400 |
| 10 | 20004 | 7/7/2023 | 1700 |
| 20 | 20007 | 14/7/2023 | 1100 |
| 25 | 20008 | 16/7/2023 | 1000 |
Expected result - if the selected date is 03/07/2023, these 2 transactions are what is needed in the report
| Vendor | Purch Ord | Planned Rcpt Date | Amount |
| 10 | 20001 | 3/7/2023 | 1500 |
| 10 | 20003 | 7/7/2023 | 1400 |
Pbix attached -
https://drive.google.com/file/d/1DELCr4EhRnJDPOyJY4BN2USLRMjrn3y7/view?usp=sharing
4 Replies
- gregoliveira
Helper II
Hi.
Can you explain me a little bit more? Are you having trouble to author the measure to identify the rows or to filter?
After you author and measure that you identify the rows, you can use it in the filter painel to show only the desired rows.
Hope this help you.
- AnonymousNot applicable
Yes. How can the measure be constructed to tie the duplicate transactions together based on the criteria and show them in the visual.
- AnonymousNot applicable
Hi Anonymous ,
Here are the steps you can follow:
1. Create calculated table.
Table = CALENDAR( DATE( 2023,1,1), DATE( 2023,12,31))2. Create measure.
Flag = var _select=SELECTEDVALUE('Table'[Date]) var _count= COUNTX( FILTER(ALL(Purchase), 'Purchase'[Planned Rcpt Date] <= _select +5&&'Purchase'[Vendor]=MAX('Purchase'[Vendor])&&MAX('Purchase'[Amount])<=1500),[Purch Ord]) return IF( _count>=2,1,0)3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- AnonymousNot applicable
Anonymous
This gave a mixed result. Thanks for sharing.
Here is what i see. The date selection seem to be ignored. I tried setting a relationship between dates and that picked only the transaction for the selected date. Made relation inactive and this provides the transaction prior to the date selected too. Attaching my pbix. Sorry not sure what messed up. .
https://drive.google.com/file/d/1DELCr4EhRnJDPOyJY4BN2USLRMjrn3y7/view?usp=sharing