Forum Discussion
Anonymous
1 year agoNot applicable
Composite Key - Duplicates
Hi All, I have the following table : ID Code Date Composite 1 2820 14.07.2024 2 1292 01.06.2024 3 5869 01.01.2024 4 2910 20.11.2024 5 2939 22.06.202...
- 1 year ago
Hi,
If you want to count the duplicates, then you can use the below measures to achieve that.
First, create a measure to count total rows in the table:
Total Count = COUNTROWS(Composite_Count)Then create a measure to count unique rows based on composite key column you have created:Unique Count = DISTINCTCOUNTNOBLANK(Composite_Count[Composite])Then measure 1 - measure 2 will give you duplicate count:Duplicate Count = [Total Count] - [Unique Count]If this helps to resolve your problem, then mark this as solution provide, thanks!
samratpbi
1 year agoSuper User
Hi,
If you want to count the duplicates, then you can use the below measures to achieve that.
First, create a measure to count total rows in the table:
Total Count = COUNTROWS(Composite_Count)
Then create a measure to count unique rows based on composite key column you have created:
Unique Count = DISTINCTCOUNTNOBLANK(Composite_Count[Composite])
Then measure 1 - measure 2 will give you duplicate count:
Duplicate Count = [Total Count] - [Unique Count]
If this helps to resolve your problem, then mark this as solution provide, thanks!
Anonymous
1 year agoNot applicable
- samratpbi1 year agoSuper User
Hi, Countrows works on table, not column. Hence please provide the table name, it should return total count in that table.
If this helps to resolve your problem, then mark it as solution, thanks!