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
dadson1996
New Member

Sum of all values in another table where the column is named a row of the table I am in

Hi All, 

 

I am trying to sum all the data in a column of a table where that column name is based on the row name of the table I am in, I am unable to find anything around this and was wondering if anyone had any good examples. 

 

For context the columns are a list of names and I am trying to get a total of their "points" across a list of events. 

 

Thanks in advance! 

 

1 ACCEPTED SOLUTION
ahadkarimi
Solution Specialist
Solution Specialist

This example can help you.

Events table:
Event Alice Bob Charlie
Event1 10 5 8
Event2 7 3 6
Event3 4 8 9
_________________________
Participants table:
Name
Alice
Bob
Charlie
_______________________
Create a measure to sum the points for each participant across all events:

TotalPoints =
VAR ParticipantName = SELECTEDVALUE(Participants[Name])
RETURN
SUMX(
Events,
SWITCH(
ParticipantName,
"Alice", Events[Alice],
"Bob", Events[Bob],
"Charlie", Events[Charlie],
0
)
)

View solution in original post

1 REPLY 1
ahadkarimi
Solution Specialist
Solution Specialist

This example can help you.

Events table:
Event Alice Bob Charlie
Event1 10 5 8
Event2 7 3 6
Event3 4 8 9
_________________________
Participants table:
Name
Alice
Bob
Charlie
_______________________
Create a measure to sum the points for each participant across all events:

TotalPoints =
VAR ParticipantName = SELECTEDVALUE(Participants[Name])
RETURN
SUMX(
Events,
SWITCH(
ParticipantName,
"Alice", Events[Alice],
"Bob", Events[Bob],
"Charlie", Events[Charlie],
0
)
)

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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