Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
daromel
Frequent Visitor

How to avoid sum duplicates values in a measure

Hi!

Please I need help. I have a table like this:

 

daromel_0-1604411688725.png

 

I need a measure that sum all the values (Column VALUE) except the row that duplicates ID and PRODUCT.

I want to put this measure the total in a card visualization.

Thank a lot!

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Why don't you de-duplicate the table before you load it into PBI? In Power Query it's just as easy to do as clicking several buttons... And if you want to know how many dup rows there ware originally for a given row, you can store the count of the row in the table as well. This will retain all the information you have in the original table and the resultant table will be as small as possible, thus DAX will be faster on it.

View solution in original post

Anonymous
Not applicable

[Measure] =
SUMX(
    SUMMARIZE(
        T,
        T[ID],
        T[Product],
        T[Value]
    ),
    T[Value]
)

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Try this

 

Measure = CALCULATE(SUMX(Tabela,Tabela[VALUE]), FILTER(Tabela,Tabela[ID]))

You can use a card with this measure.

amitchandak
Super User
Super User

@daromel , Power Query, Remove duplicate rows: https://www.youtube.com/watch?v=Hc5bIXkpGVE

 

In Dax =

New table =distinct(Table)

 

or summarize(Table,Table [ID],Table[Product],Table[Value])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Why don't you de-duplicate the table before you load it into PBI? In Power Query it's just as easy to do as clicking several buttons... And if you want to know how many dup rows there ware originally for a given row, you can store the count of the row in the table as well. This will retain all the information you have in the original table and the resultant table will be as small as possible, thus DAX will be faster on it.

Thanks for the answering, 

The table has others fields that I need. 

No all the fields are duplicates, just some of then.

Anonymous
Not applicable

[Measure] =
SUMX(
    SUMMARIZE(
        T,
        T[ID],
        T[Product],
        T[Value]
    ),
    T[Value]
)

It worked perfect. thank you!!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.