Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
I have a question about Goal Seek possibility in Power Query. I have a fictive loan dataset.
Start Collateral | The value of the collateral at the beginning of the loan |
Collateral | Currently value of the collateral |
Loans | Outstanding loan balance |
Current Value – Loans | The difference between the current value of the collateral and the outstanding loan balance |
I want to know what the % (cell G2) the collateral should decrease so that sum of the difference The difference between the current value of the collateral and the outstanding loan balance will be zero, cell G8. I am using the Excel Goal Seek function to calculate cell G2.
I want to know if there is a similar way to perform a Goal Seek using Power Query, either in Excel or Power BI, but preferably both.
Cells C3 – E7: hard values
Cell F2: Formula =D3-E3, copied down to F7
Cell G3: Formula =(D3*$G$2)-E3 copied down to G7
Cell G2: hard value, to be calculated
Cell G8: =SUM(G3:G7)
I looked around and this is what I found:
But it is not clear to me.
Thanks,
Nav
Solved! Go to Solution.
Hi @naveen73 ,
Please try these measures.
Current Value - Loans =
SUM ( 'Table'[Collateral] ) - SUM ( 'Table'[Loans] )
G =
VAR G2 = 0.8557287
RETURN
SUM ( 'Table'[Collateral] ) * G2
- SUM ( 'Table'[Loans] )
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 @naveen73 ,
Please try these measures.
Current Value - Loans =
SUM ( 'Table'[Collateral] ) - SUM ( 'Table'[Loans] )
G =
VAR G2 = 0.8557287
RETURN
SUM ( 'Table'[Collateral] ) * G2
- SUM ( 'Table'[Loans] )
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 Naveen
I appreciate that this post is already marked as solved but not sure that the solution provided actually mimics the goal seek feature of Excel - if the logic is simple you can reverse it to find the unknown variable (as has been proposed) but in a case like this where you need to iterate through the result of multiple calculations I don't believe this approach works!
I've instead proposed an approach using the list.accumulate function in M (excel version https://rsaprahotmail.sharepoint.com/:x:/s/LDIGeneral/EVAB-rjIjAZNjTsKCGO-yT0BmhY7MxFaphB5h-OQBkCAxg... and PBI version https://rsaprahotmail.sharepoint.com/:u:/s/LDIGeneral/EY2hW3C2_INLk0qLjp_jiFsBAxHHITZNixPn3AgI2yDBOw...) - let me know what you think pls!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
70 | |
63 | |
40 | |
28 | |
16 |