Forum Discussion
Find duplicate values diferent projects
Hi,
It is possible to have a measure that find me duplicate values for project IDs in the same location?
For example, there is project ID 1 for the same location Lisbon.
The same happens with Porto location that have the project ID 17 duplicated.
| Location | Project ID | Return |
| Lisbon | 1 | 500 |
| Porto | 17 | 650 |
| Santarem | 1 | 780 |
| Lisbon | 2 | 250 |
| Santarem | 2 | 589 |
| Faro | 1 | 785 |
| Lisbon | 1 | 658 |
| Aveiro | 1 | 500 |
| Porto | 2 | 200 |
| Porto | 3 | 300 |
| Porto | 17 | 258 |
Thanks in avance
- Anonymous7 years ago
Hi wolfy_,
In my opinion, you can calculate count and distinct count of specific project id from same location. Then calculate the diff between them, It should be the duplicate id count.
Measure = CALCULATE ( COUNT ( Table[Project ID] ) - DISTINCTCOUNT ( Table[Project ID] ), ALLSELECTED ( Table ), VALUES ( Table[Location] ) )Regards,
Xiaoxin Sheng
2 Replies
- AnonymousNot applicable
Hi wolfy_,
In my opinion, you can calculate count and distinct count of specific project id from same location. Then calculate the diff between them, It should be the duplicate id count.
Measure = CALCULATE ( COUNT ( Table[Project ID] ) - DISTINCTCOUNT ( Table[Project ID] ), ALLSELECTED ( Table ), VALUES ( Table[Location] ) )Regards,
Xiaoxin Sheng
- Ashish_MathurSuper User
Hi,
You can drag Location and Project ID to the row labels and write this measure
=COUNTROWS(Data)
Hope this helps.