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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
TahniatMansoor
New 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 ?
1 ACCEPTED SOLUTION
tamerj1
Community Champion
Community Champion

Hi @TahniatMansoor 

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 } )
)

View solution in original post

2 REPLIES 2
tamerj1
Community Champion
Community Champion

Hi @TahniatMansoor 

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 } )
)
technolog
Super User
Super User

Hi! You must use CALCULATE twice inside DIVIDE:

CI_DIST + DIVIDE( CALCULATE(....), CALCULATE(....) )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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