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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
naveen73
Helper III
Helper III

Goal Seek

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)

 

naveen73_0-1656149498249.png

 

I looked around and this is what I found:

 

https://community.powerbi.com/t5/Desktop/HELP-WITH-DAX-Simulate-Excel-What-If-Analysis-Goal-Seek/m-p...

 

But it is not clear to me.

 

Thanks,

 

Nav

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

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] )

vkkfmsft_0-1656382706529.png

 

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.

 

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

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] )

vkkfmsft_0-1656382706529.png

 

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.

 

rsaprano
Most Valuable Professional
Most Valuable Professional

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!

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors