Forum Discussion

naveen73's avatar
naveen73
Helper III
4 years ago
Solved

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)

 

 

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/1009110#M478012

 

But it is not clear to me.

 

Thanks,

 

Nav

  • 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.

     

2 Replies