March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi guys,
I need to create a measure that uses a deposit balance and then applying a run-off rate that I get from a reference table I need to calculate what the balance will be in subsequent periods. For example, I need to calculate what the balance will be each month from the first month and then also how many months does it take to get to zero balance.
This is the result I'm after
I can not seem to do this without creating a circular reference error in Dax, this is because I'm using the previous period balance to calculate the current period balance.
Any help would be appreciated
By the way, I know that the NPV and xNPV formula are generally idea for doing this but I can not use them as once i have figured how to do this, I will have to apply extra logic that is custom to my use case. Hence why I'm trying to create the calcs. from first principles. For example, my uses case needs me to factor in a changing runoff rate, whereas the NPV formula assumes a constant runoff rate etc...
cheers
Solved! Go to Solution.
Hi @adin ,
You can use the PRODUCTX function, like this:
Measure =
VAR __d = MAX ( 'runoffrate'[Period] )
RETURN 1000 * CALCULATE ( PRODUCTX ( runoffrate, [Rate] ), ALLSELECTED ( runoffrate ), runoffrate[Period] <= __d )
Rate = 1 - MAX(runoffrate[Run off rate])
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi
can i get help with the above measure and in particular getting the total to sum up to the correct amount of the column?
@amitchandak is this possible in power bi measures, or am I wasting time with measures and need to do it in columns or in my DB
Hi @adin ,
You can use the PRODUCTX function, like this:
Measure =
VAR __d = MAX ( 'runoffrate'[Period] )
RETURN 1000 * CALCULATE ( PRODUCTX ( runoffrate, [Rate] ), ALLSELECTED ( runoffrate ), runoffrate[Period] <= __d )
Rate = 1 - MAX(runoffrate[Run off rate])
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |