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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
estt
Frequent Visitor

Column with sum of distinct values

Hello, i need help to make a column that sum the numbers in the column tp_kmro, based on the column id_pref. In the column id_pref i have the id and this id repeats lots of times ex:

 

id_preftp_kmro
12
12
12
24
24
35

 

i made a column based on id_pref with distinct values so the new id_pref is now:

1
2
3

 

Now i need to make a new column tp_kmro with the sum of all values in this column

example: sum all values in tp_kmro and put next to id_pref .

 

like this:

id_preftp_kmro
16 (2+2+2)
28 (4+4)
35 (5)

 

Can someone help with this please?

1 ACCEPTED SOLUTION

@estt 

Right click on the id_pref, select Group By

Fowmy_0-1678131519149.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
estt
Frequent Visitor

Thanks, it worked!

Fowmy
Super User
Super User

@estt 

Create the below measure and use it in a Table Visual along with your id_pref column

Total = sum(tablename[tp_kmro])

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

estt
Frequent Visitor

It worked man thanks, but i need to make this column in power query.

@estt 

Right click on the id_pref, select Group By

Fowmy_0-1678131519149.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors