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
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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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