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 September 15. Request your voucher.

Reply
carl8484
New Member

Convert a SUMIF from Excel

Hi,

 

I'm trying to convert a SUMIF to PowerBI. Someone who could help me in the right direction?

 

I'm having a range of unique CSAT scores in (CSAT[Scores]). Each score represents a customer feedback from a customer after en interaction with a customer service agent. The customer agents ID is a unique number ID listed in (CSAT[UserID]).

 

CSAT-table.PNG

 

 

I want to connect the score to a name in a new column. So in a separate table I have the unique number ID in [Contacts[UserID] and the name of the agent in [Contacts[Agentname]).

 

Agentname.PNG

 

In Excel, it's quite basic with a SUMIF to check a range for a unique number ID towards a range with corresponding names and summarize results for that agent.

 

What would I like to acheive?

To create a new column in (CSAT) with the actual name of the agent so I can create an average of score, calculate number of responses the agent has received etc. The screenshot below is how it will look like, but currently you will have to know the UserID to find a specific agent from the dropdown "Select advisor" ...

 

Dashboard.PNG

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @carl8484 ,

You can try to CALCULATE and SUM functions or direct use SUMX with FILTER to equivalent excel sumif expression. Since I do not so clear for your data structure, can you please provide some dummy data with excel expression for test?

In addition, you can also try o use following measure formula if it meets for your requirement:

result =
VAR selected =
    VALUES ( Selector[Agentname] )
VAR list =
    CALCULATE (
        VALUES ( Contacts[UserID] ),
        FILTER ( ALLSELECTED ( Contacts ), [Agentname] IN selected )
    )
RETURN
    CALCULATE (
        SUM ( CSAT[Scores] ),
        FILTER ( ALLSELECTED ( CSAT ), [UserID] IN list )
    )

Regards,

Xiaoxin Sheng

parry2k
Super User
Super User

@carl8484 can you share sample data file and expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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 Kudoed Authors