Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have a table where I have used a DAX formula to determine if a row is a "duplicate" by counting the number of occurrences. In this scenario, a duplicate is when the values of Fruit and Color in one row both match the values for Fruit and Color in another row.
Table1
| Fruit | Color | Occurences | 
| Apple | Red | 1 | 
| Apple | Green | 3 | 
| Grape | Purple | 2 | 
| Apple | Green | 3 | 
| Grape | Green | 1 | 
| Apple | Green | 3 | 
| Grape | Yellow | 1 | 
| Apple | Yellow | 1 | 
| Grape | Purple | 2 | 
| Fruit | Color | Occurrences | 
| Apple | Green | 3 | 
| Grape | Purple | 2 | 
Thanks in advance.
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
It is for creating a new table.
Expected table = 
	SUMMARIZE(
		FILTER(
			ADDCOLUMNS(
				Table1,
				"@occurences", VAR _CurrentFruit = 'Table1'[Fruit]
				VAR _CurrentColor = 'Table1'[Color]
				RETURN
					COUNTROWS(FILTER(
						'Table1',
						'Table1'[Fruit] = _CurrentFruit &&
						'Table1'[Color] = _CurrentColor
					)
					)
			),
			[@occurences] > 1
		),
		Table1[Fruit],
		Table1[Color],
		[@occurences]
	)Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
It is for creating a new table.
Expected table = 
	SUMMARIZE(
		FILTER(
			ADDCOLUMNS(
				Table1,
				"@occurences", VAR _CurrentFruit = 'Table1'[Fruit]
				VAR _CurrentColor = 'Table1'[Color]
				RETURN
					COUNTROWS(FILTER(
						'Table1',
						'Table1'[Fruit] = _CurrentFruit &&
						'Table1'[Color] = _CurrentColor
					)
					)
			),
			[@occurences] > 1
		),
		Table1[Fruit],
		Table1[Color],
		[@occurences]
	)Thank you @Jihwan_Kim ! It seems to provide the correct answer for me, but I want to be sure I applied it as you intended. I created a new measure and used this to get "2" as my value. As it's my first time using "Summarize", it's new to me. It's interesting to see that I can generate a virtual table, I didn't know about this functionality.
# Distinct Duplicates = 
VAR _Table =	SUMMARIZE(
		FILTER(
			ADDCOLUMNS(
				Table1,
				"@occurences", VAR _CurrentFruit = 'Table1'[Fruit]
				VAR _CurrentColor = 'Table1'[Color]
				RETURN
					COUNTROWS(FILTER(
						'Table1',
						'Table1'[Fruit] = _CurrentFruit &&
						'Table1'[Color] = _CurrentColor
					)
					)
			),
			[@occurences] > 1
		),
		Table1[Fruit],
		Table1[Color],
		[@occurences]
	)
RETURN COUNTROWS(_Table)
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |