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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jake__789456
New Member

CALCULATE - Based on value in the data

Hello,

 

I am new to DAX and Power BI so please bare with me!

 

I am working with a report that contains many customer survey feedback responses for employees. Each employee is ranked on a score of 1 to 10. The scores are totalled up at the end of each quarter. I'd to create a column that calculates the total score for each employee per Q.

 

Here is an example that I created in excel. "Employee Total Per Q" is the extra column I would like to create

 

Jake__789456_0-1607650229770.png

 

I looked at the CALCULATE function but that seems to require a specific value to be inputted like "Q3". Is this too complicated for a new column? Is there a better way to do this?

 

Thanks!

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

in calculated column, use this code

=calculate(sum(table[survey score]),allexcept(table,table[employee],table[Q+Year]))

View solution in original post

2 REPLIES 2
Jake__789456
New Member

Thank you @wdx223_Daniel!

 

Your solution worked, I'm not sure I understand exactly why but thank you all the same! 😉

wdx223_Daniel
Super User
Super User

in calculated column, use this code

=calculate(sum(table[survey score]),allexcept(table,table[employee],table[Q+Year]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors