Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |