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! Request now

Reply
WorkHard
Helper V
Helper V

Calculate the cost while ignoring duplicates

I'm sure this is easy but the logic escapes me.

In DAX, How would I ignore the duplicate while calculating the Cost?

 

IDCostDesired Result
11010
110
25050
250
1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @WorkHard 

It would be easier to remove the duplicates in Poer Query. If you want the total cost without the duplicates, create a measure and place it in a card visual:

 

Measure =
SUMX ( DISTINCT ( Table1[ID] ), CALCULATE ( MAX ( Table1[Cost] ) ) )

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @WorkHard 

It would be easier to remove the duplicates in Poer Query. If you want the total cost without the duplicates, create a measure and place it in a card visual:

 

Measure =
SUMX ( DISTINCT ( Table1[ID] ), CALCULATE ( MAX ( Table1[Cost] ) ) )

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors