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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Dax to find total Units with out duplicates

Hi Team,

 

Please find the sample data,

 

Item CodeItem DescriptionSales PeriodPromotion NameSales UnitsForecast Units
10000PepsiP12019P12019 A1001325
100012 DISNEYP12019P12019 A290
1000220X16P12019P12019 A600
10019NXT EDPP12019P12019 A125109
10019NXT EDPP12019P12019 B125109
10021A G P12019P12019 A130210
10021A G P12019P12019 B130210
10023A G 50MLP12019P12019 A10196
      
   Total Inc Dup709 
   Actual454 

 

You can see the item codes 10019,10021 are duplicating .I want to find out the Sum of Sales Unts with out duplicates.As you can see the expected result as well in the grid.Can some one suggest me the best DAX formula to achieve this.

 

Thank you

 

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

You could create a measure using dax below:

Total Inc Dup = 
SUMX (
    SUMMARIZE (
        'Table',
        'Table'[Sales Units],
        "Item Code", DISTINCT ( 'Table'[Item Code] )
    ),
    'Table'[Sales Units]
)

Capture.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-yuta-msft,

 

Thank you for the reply.

 

Actully the above shown girds are showing the sum of sales units against each item code,so the suggested DAX not applicable.

 

Thank you

@Anonymous ,

 

Could you please give the expected result?

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Hi Jimmy,

 

Expected result it 494 but im not getting the result in the actual data with your formula.

 

Thank you

Biju

@Anonymous ,

 

I'm afraid I still couldn't understand your requirement, could please explain how to achieve 494 sales total and could you share the complete sample data for further test?

 

Regards,

Jimmy Tao

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors