cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
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!

3 REPLIES 3
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

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!

Super User

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.

@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors