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
ndna74
Frequent Visitor

What-if / measure

Hi all

 

I've created a measure (below) that calculates loan yield that can be adjusted with a what-if parameter (rate change)

 

Rate adjust = SUM('_Portfolio Internal'[Amount])* (sum('_Portfolio Internal'[Rate]) +'Rate change'[Rate change Value])

 

When I change the rate on the what-if slider, the yield per loan increase/decrease is correct but the overal increase/decrease for the portfolio is not. This is because when I put this measure into a card, the calucation mutiplies the sum of all amounts with the sum of all rates.

 

Does anyone know how I can rectify this?

 

thanks

Nick

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

To get the correct value in the Total Row (or when in a Card) use this Measure instead

 

Rate adjust =
SUMX (
    '_Portfolio Internal',
    '_Portfolio Internal'[Amount]
        * ( '_Portfolio Internal'[Rate] + 'Rate change'[Rate change Value] )
)

SUMX will perform this per row and then add those results - instead of first summing each column

 

Hope this helps! Smiley Happy

View solution in original post

3 REPLIES 3
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @ndna74,

Have you resolved your issue? If you have, please mark the right answer or helpful reply as answer. If you have not, you'd better share your sample table or screenshot for further analysis.

Best Regards,
Angelia

Sean
Community Champion
Community Champion

To get the correct value in the Total Row (or when in a Card) use this Measure instead

 

Rate adjust =
SUMX (
    '_Portfolio Internal',
    '_Portfolio Internal'[Amount]
        * ( '_Portfolio Internal'[Rate] + 'Rate change'[Rate change Value] )
)

SUMX will perform this per row and then add those results - instead of first summing each column

 

Hope this helps! Smiley Happy

Greg_Deckler
Community Champion
Community Champion

Can't really get a sense of your data and such with this explanation but it sounds like you need to filter your Card visual or put some ALLEXCEPT type filters in your SUM statements via a CALCULATE. Hard to really tell what is going on from the information given.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.