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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Womkas_90
Regular Visitor

How to sum up one column, but exclude values when values of another column are doubled?

Hello Again dear Community,

 

Im just not getting the hang of it 😞

I want to sum up all involved Persons, but take only 1 in consideration per ID_Product.

 

Therefore i want to get the sum of 1+4+2+5+3  = 15

 

I thought i could use

= CALCULATE(SUMX('TABLE',[Involved_Persons]), DISTINCT('TABLE'[ID_Product]))

I understand, that now the distinction is made in every row, therefore it returns it this way, because the date is unique.

 

ID_CategoryID_ProductDateInvolved_Persons
1101.02.20201
1101.03.20201
1201.04.20204
1301.05.20202
1401.06.20205
1401.07.20205
1401.08.20205
1401.09.20205
2601.11.20203
2601.12.20203
2601.01.20213

 

 

Can someone help me with that? Thank you very much!

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @Womkas_90 ,

 

You can try the following methods.

 

Measure:

Total =

SUMX(

    SUMMARIZE(

        'PRODUCT','PRODUCT'[ID_Product],'PRODUCT'[Involved_Persons]

        ),

        [Involved_Persons]

    )

vyinliwmsft_2-1662692096603.png

 

 

vyinliwmsft_1-1662692039992.png

 

Is this the result you expect?

 

Best Regards,

 

Community Support Team _Yinliw

 

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

View solution in original post

2 REPLIES 2
v-yinliw-msft
Community Support
Community Support

Hi @Womkas_90 ,

 

You can try the following methods.

 

Measure:

Total =

SUMX(

    SUMMARIZE(

        'PRODUCT','PRODUCT'[ID_Product],'PRODUCT'[Involved_Persons]

        ),

        [Involved_Persons]

    )

vyinliwmsft_2-1662692096603.png

 

 

vyinliwmsft_1-1662692039992.png

 

Is this the result you expect?

 

Best Regards,

 

Community Support Team _Yinliw

 

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

amitchandak
Super User
Super User

@Womkas_90 , You need use calculate here

 

SUMX(values('TABLE'[Involved_Persons]),calculate( DISTINCT('TABLE'[ID_Product])))


or countrows(Sumamrize(Table, Table[Involved_Persons],'TABLE'[ID_Product]))

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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