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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Vyshnavi
New Member

i got contribution more 100% how to resolve these issue ... below i have shared the logic

I need to calculate th contribution for opportunity rsv  threshold .but i'm getting more than 100%

first i calcualted the opportunity rsv logic 
Opportunity RSV = [New RSV]-[RSV]

later i created the driving measure to get postive and negative data.
RSV_Threshold =

var opportunityrsv=[Opportunity RSV]

return if(opportunityrsv < 0 ,-1,IF([Opportunity RSV]>0,1,0))

i calculated the rsv threshold at cell level i summed up opportunity rsv .
Opportunity Rsv Threshold =

VAR positive_opportunity_rsv = SUMX (
'Target',
IF ('Target'[RSV_Threshold]=1 , [Opportunity RSV], 0 )
)
VAR negative_opportunity_rsv = SUMX (
'Target',
IF ( 'Target'[RSV_Threshold] = -1, [Opportunity RSV], 0 )
)
VAR net_rsv = positive_opportunity_rsv - negative_opportunity_rsv

var Opportunityrsv=
SWITCH(
MAX('Opportunity RSV'[Opportunity RSV Comparison]) ,
"Negative opportunity RSV",negative_opportunity_rsv ,
"Positive opportunity RSV", positive_opportunity_rsv ,
"NET Opportunity RSV", net_rsv)

return IF(ISBLANK(SUM('Time Progression'[Progression Offset])), BLANK(), Opportunityrsv)

 now i need to calculate the contribution intried the below logic but it's giving more than 100% how to resolve these.

Opportunity Rsv Threshold contribution =
var totarsv=CALCULATE(SUMX(Target, [Opportunity RSV]),ALL(Target))
VAR positive_opportunity_rsv = SUMX (
            'Target',
            IF ('Target'[RSV_Threshold]=1 , [Opportunity RSV], 0 )
        )
VAR negative_opportunity_rsv = SUMX (
            'Target',
            IF ( 'Target'[RSV_Threshold] = -1, [Opportunity RSV], 0 )
        )
VAR net_rsv = positive_opportunity_rsv +negative_opportunity_rsv

var Opportunityrsv=  
SWITCH(
        MAX('Opportunity RSV'[Opportunity RSV Comparison]) ,
    "Negative opportunity RSV",DIVIDE(negative_opportunity_rsv,totarsv) ,
    "Positive opportunity RSV", DIVIDE( positive_opportunity_rsv,totarsv) ,
    "NET Opportunity RSV",DIVIDE( net_rsv,totarsv))
       
return IF(ISBLANK(SUM('Time Progression'[Progression Offset])), BLANK(), Opportunityrsv)
   
1 ACCEPTED SOLUTION
Vyshnavi
New Member

var totarsv=CALCULATE(SUMX(Target, [Opportunity RSV]),ALL(Target))
VAR positive_opportunity_rsv = SUMX (
            'Target',
            IF ('Target'[RSV_Threshold]=1 , [Opportunity RSV], 0 )
        )
VAR negative_opportunity_rsv = SUMX (
            'Target',
            IF ( 'Target'[RSV_Threshold] = -1, [Opportunity RSV], 0 )
        )
VAR net_rsv = positive_opportunity_rsv +negative_opportunity_rsv

 

var Opportunityrsv=  
SWITCH(
        MAX('Opportunity RSV'[Opportunity RSV Comparison]) ,
    "Negative opportunity RSV",DIVIDE(negative_opportunity_rsv,totarsv) ,
    "Positive opportunity RSV"DIVIDE( positive_opportunity_rsv,totarsv) ,
    "NET Opportunity RSV",DIVIDE( net_rsv,totarsv))
       
return IF(ISBLANK(SUM('Time Progression'[Progression Offset])), BLANK(), Opportunityrsv)
   these logic is giving more than 100%
 

View solution in original post

3 REPLIES 3
Vyshnavi
New Member

Vyshnavi_0-1729056461272.png

the measure i'm using 

contribution =
var Total_RSV =
CALCULATE([Opportunity RSV],  FILTER(Target,[RSV_Threshold] = 1 || 'Target'[RSV_Threshold] = -1),REMOVEFILTERS('Target'))


VAR Positive_RSV =
SUMX(
    'Target',
    IF('Target'[RSV_Threshold] = 1, [Opportunity RSV], 0)
)

VAR Negative_RSV =
SUMX(
    'Target',
    IF('Target'[RSV_Threshold] = -1, [Opportunity RSV], 0)
)

VAR Net_RSV = Positive_RSV - Negative_RSV


VAR Positive_Contribution =
DIVIDE(Positive_RSV, Total_RSV, 0)

VAR Negative_Contribution =
DIVIDE(Negative_RSV, Total_RSV, 0)

VAR Net_Contribution =
DIVIDE(Net_RSV, Total_RSV, 0)

RETURN
SWITCH(
    MAX('Opportunity RSV'[Opportunity RSV Comparison]),
    "Positive opportunity RSV", Positive_Contribution,
    "Negative opportunity RSV", Negative_Contribution,
    "NET Opportunity RSV", Net_Contribution,
    BLANK()
)
Vyshnavi
New Member

var totarsv=CALCULATE(SUMX(Target, [Opportunity RSV]),ALL(Target))
VAR positive_opportunity_rsv = SUMX (
            'Target',
            IF ('Target'[RSV_Threshold]=1 , [Opportunity RSV], 0 )
        )
VAR negative_opportunity_rsv = SUMX (
            'Target',
            IF ( 'Target'[RSV_Threshold] = -1, [Opportunity RSV], 0 )
        )
VAR net_rsv = positive_opportunity_rsv +negative_opportunity_rsv

 

var Opportunityrsv=  
SWITCH(
        MAX('Opportunity RSV'[Opportunity RSV Comparison]) ,
    "Negative opportunity RSV",DIVIDE(negative_opportunity_rsv,totarsv) ,
    "Positive opportunity RSV"DIVIDE( positive_opportunity_rsv,totarsv) ,
    "NET Opportunity RSV",DIVIDE( net_rsv,totarsv))
       
return IF(ISBLANK(SUM('Time Progression'[Progression Offset])), BLANK(), Opportunityrsv)
   these logic is giving more than 100%
 
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.