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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Vyshnavi
New Member

I need to find out the contribution for row level

I have a requirement to calculate the rsv data at cell level for postive rsv and negative rsv ans net is positive minus negative .for that i have created the static table with three entries postive rsv ans negative rsv and net rsv .i found the opportunity rsv 

Opportunity RSV = [New RSV]-[RSV]

now i craeted another measure which is rsv threshold for getting postive and negative comaprison .
RSV_Threshold =

var opportunityrsv=[Opportunity RSV]

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

finally i have created the opportunity rsv threshold measure to calculate the sum at cell level .
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 for positive and negative and net rsv . i tried to calculate but it's giving more than 100% how to write query to calculate the contribution by using above logic .

Vyshnavi_0-1728999168791.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Vyshnavi ,

 

Please try this measure:

Opportunity Rsv Threshold contribution = 
VAR __total_value = SUMX(ALL('Opportunity RSV'[Opportunity RSV Comparison]),[Opportunity Rsv Threshold])
VAR __curr_value = [Opportunity Rsv Threshold]
VAR __result = DIVIDE( __curr_value, __total_value)
RETURN
__result

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Vyshnavi ,

 

Please try this measure:

Opportunity Rsv Threshold contribution = 
VAR __total_value = SUMX(ALL('Opportunity RSV'[Opportunity RSV Comparison]),[Opportunity Rsv Threshold])
VAR __curr_value = [Opportunity Rsv Threshold]
VAR __result = DIVIDE( __curr_value, __total_value)
RETURN
__result

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

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.