Forum Discussion
TahniatMansoor
4 years agoNew Member
Getting Error: calculation error in measure
CI_DIST = CALCULATE (DIVIDE (( (SUM('SCORECARD (2)'[CI_3_AVG])/SUM('RR_SCORECARD_IND_SUMMARY (2)'[CI_3_CAT])) * SUM('SCORECARD(2)'[CI_DIST_YTD]) ) , SUM('SCORECARD (2)'[CS_CURR])),'RR_SCORECARD_IND_SUMMARY (2)'[CAT] <> {40,50,52,53})
I am trying to do a DIVIDE on all of the rows in table scorecard omitting rows where CAT where is 40, 50, 52, 53. I am getting an error table of mutiple values was supplied where a single value was expected. What am I doing wrong ?
please use
CI_DIST = CALCULATE ( DIVIDE ( ( ( SUM ( 'SCORECARD (2)'[CI_3_AVG] ) / SUM ( 'RR_SCORECARD_IND_SUMMARY (2)'[CI_3_CAT] ) ) * SUM ( 'SCORECARD(2)'[CI_DIST_YTD] ) ), SUM ( 'SCORECARD (2)'[CS_CURR] ) ), NOT ( 'RR_SCORECARD_IND_SUMMARY (2)'[CAT] IN { 40, 50, 52, 53 } ) )
2 Replies
- tamerj1Community Champion
please use
CI_DIST = CALCULATE ( DIVIDE ( ( ( SUM ( 'SCORECARD (2)'[CI_3_AVG] ) / SUM ( 'RR_SCORECARD_IND_SUMMARY (2)'[CI_3_CAT] ) ) * SUM ( 'SCORECARD(2)'[CI_DIST_YTD] ) ), SUM ( 'SCORECARD (2)'[CS_CURR] ) ), NOT ( 'RR_SCORECARD_IND_SUMMARY (2)'[CAT] IN { 40, 50, 52, 53 } ) ) - technologSuper User
Hi! You must use CALCULATE twice inside DIVIDE:
CI_DIST + DIVIDE( CALCULATE(....), CALCULATE(....) )