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
BTLYBSCT
Regular Visitor

DAX Measure - SUM a measure and divide by rows with values

Hi Guys,

 

First time poster and a new to PowerBI.

 

I have created a measure which looks up a table and based off the KPI provides a set score.

 

CC_KPI_SCORE = LOOKUPVALUE('CCO CC_KPI_SCORES_VIEW'[Score],'CCO CC_KPI_SCORES_VIEW'[KPI],AllDurationToSecMeasures[CC_KPI])

 

Now I would like to SUM up the total of the scores based off the filter of the agent and then divide it by rows with only VALUES in it however when I try CALCULATE(SUM) function I can't pick up the column which I assume due to being a measure.

 

I have tried everything to my knowledge and can say I'm truly stumped.

 

Is anyone able to help me out here.

 

I started with just summing up the total based off filters and I can't even get result.

 

Thanks in advance!

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @BTLYBSCT,

 

I made one sample for your reference, If it doesn't meet your requirement, kindly share your sample data and excepted result to me.

 

Measure = CALCULATE(SUM(AllDurationToSecMeasures[CC_KPI_SCORE]),ALLSELECTED(AllDurationToSecMeasures))/CALCULATE(COUNTROWS(AllDurationToSecMeasures))

Capture.PNG

 

Also find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @BTLYBSCT,

 

I made one sample for your reference, If it doesn't meet your requirement, kindly share your sample data and excepted result to me.

 

Measure = CALCULATE(SUM(AllDurationToSecMeasures[CC_KPI_SCORE]),ALLSELECTED(AllDurationToSecMeasures))/CALCULATE(COUNTROWS(AllDurationToSecMeasures))

Capture.PNG

 

Also find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @BTLYBSCT,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.