Forum Discussion
How to calculate duplicate based on different column
Hi All,
I am new in Power BI and wanted to know how can I calculate duplicate in below situation.
| Number | Assignment group | Parent |
| 1 | A | XYZ |
| 2 | B | XYZ |
| 3 | A | XYZ |
In this cases I want if Assignment group is different but parent is same then it will treat as a duplicate. So here 1 records we can consider duplicate.
Apprecaite any one of your help
- Anonymous2 years ago
Hi Anonymous ,
We can update the measure.
Record = COUNTROWS( DISTINCT(SELECTCOLUMNS('Table',"parent",[Parent],"group",[Assignment group])))If the above one can't help you get the desired result, please provide your expected result with backend logic.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AnonymousNot applicable
Hi Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a measure.
Record = DISTINCTCOUNT('Table'[Parent])(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi,
Thanks for your reply but that solution not going to work as your doing disticnt only in one column. Let me tell my requirment once again.
Number Assignment group Parent 1 A XYZ 2 B XYZ 3 A XYZ Based on the above table either 1 & 2 consider as double or 2 & 3 consider as double. Not 1 & 3
- AnonymousNot applicable
Hi Anonymous ,
We can update the measure.
Record = COUNTROWS( DISTINCT(SELECTCOLUMNS('Table',"parent",[Parent],"group",[Assignment group])))If the above one can't help you get the desired result, please provide your expected result with backend logic.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.