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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone,
I have table of material number with plant, country, region, quantity and value.
The materials can exists in serveral plants.
It can happen several plants in a country.
And I want to explore the duplicated materials
I want to create a table to show by region, country and how many materials are duplicated and sum of duplicated quantity and value. And as data above, the duplicated found in Germany, Europe and total value is 60.83 +0 = 60.83, total duplicated part 7+4 = 11
Thanks,
BRs,
Phuc
Solved! Go to Solution.
Create below 3 measure:
Measure 1:
DuplicatedMaterials =
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
COUNTROWS(
FILTER(
'Table',
'Table'[MATNR] = EARLIER('Table'[MATNR])
)
) > 1
)
)
Measure 2:
SumDuplicatedQuantity =
CALCULATE(
SUM('Table'[Quantity]),
FILTER(
'Table',
COUNTROWS(
FILTER(
'Table',
'Table'[MATNR] = EARLIER('Table'[MATNR])
)
) > 1
)
)
Measure 3:
SumDuplicatedValue =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
COUNTROWS(
FILTER(
'Table',
'Table'[MATNR] = EARLIER('Table'[MATNR])
)
) > 1
)
)
Output:
All the other regions are blank , that's why not showing those rows. If you need to show rows with no data, follow below steps:
Right click on Region column and select show item with no data. See image:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
hi @tietvinhphuc ,
try like:
duplicate qty=
SUMX(
FILTER(
ADDCOLUMNS(
SUMMARIZE(data, data[region], data[country]),
"Count", CALCULATE(COUNTROWS(data)),
"Qty", CALCULATE(SUM(data[quantity])
),
[Count]>1
),
[Qty]
)
duplicate value=
SUMX(
FILTER(
ADDCOLUMNS(
SUMMARIZE(data, data[region], data[country]),
"Count", CALCULATE(COUNTROWS(data)),
"@value", CALCULATE(SUM(data[value])
),
[Count]>1
),
[@value]
)
Create below 3 measure:
Measure 1:
DuplicatedMaterials =
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
COUNTROWS(
FILTER(
'Table',
'Table'[MATNR] = EARLIER('Table'[MATNR])
)
) > 1
)
)
Measure 2:
SumDuplicatedQuantity =
CALCULATE(
SUM('Table'[Quantity]),
FILTER(
'Table',
COUNTROWS(
FILTER(
'Table',
'Table'[MATNR] = EARLIER('Table'[MATNR])
)
) > 1
)
)
Measure 3:
SumDuplicatedValue =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
COUNTROWS(
FILTER(
'Table',
'Table'[MATNR] = EARLIER('Table'[MATNR])
)
) > 1
)
)
Output:
All the other regions are blank , that's why not showing those rows. If you need to show rows with no data, follow below steps:
Right click on Region column and select show item with no data. See image:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |