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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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