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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ZickZack
Regular Visitor

Calculation of two column values considering duplicates

Hi all,

I have data in an Excel spreadsheet. The first thing I want to do is find out the count of all unique VINs per model. I do this with the measure = DISTINCTCOUNT. Then I want to multiply the summed number of vehicles with the net EB for the specific model. Example: Model SZ has a net EB of 1200. The clear number of vehicles for model SZ is 2. Then the calculation should be: 2*1200. When I calculate this in Power Bi, the duplicates are always included in the calculation. Why?

 

This is my data model

ModellFahrgestellnet EB
SZ1231200
SZ1231200
SZ1231200
SZ8881200
SH2344500
SY5432351
SH6651351

 

I want to represent that in Power BI:

 

Modellnumber of vehiclesnet EBnumber of vehicles * Netto EB
SZ212002400
SH245009000
SY123512351

 

And that is what i get in Power BI:

 

ZickZack_1-1692953291334.png

 

My Measure for Sales Volumen is: 

 

Sales Volumen = [number of vehicles] * SUMX(Table,Table[net EB])

 

I'm not very familiar with DAX and can't find my mistake. Can you help?

 

Thankx a lot

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ZickZack ,

You can update the formula of your measure as below to get it, please find the details in the attachment.

Sales Volumen = 
VAR _tab =
    SUMMARIZE ( 'Table', 'Table'[Modell], 'Table'[Fahrgestell], 'Table'[net EB] )
RETURN
    SUMX ( _tab, [net EB] )

vyiruanmsft_0-1693209895883.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @ZickZack ,

You can update the formula of your measure as below to get it, please find the details in the attachment.

Sales Volumen = 
VAR _tab =
    SUMMARIZE ( 'Table', 'Table'[Modell], 'Table'[Fahrgestell], 'Table'[net EB] )
RETURN
    SUMX ( _tab, [net EB] )

vyiruanmsft_0-1693209895883.png

Best Regards

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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