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
astojanac
Helper II
Helper II

HELP WITH DAX: Simulate Excel What-If-Analysis Goal Seek

Hello everyone, 

I need help with one DAX. Actually, I need something that is in excel called 'What-If-Analysis/Goal Seek' .

I would try to explain problem: 

 

I have two known components - example stock (I will name it A) and sales (I will name it B), at the moment. 

And I have ratio between them as end of period goal (I will name it GOAL).

My unknown component, the one I need help with, is forecast sale by the end of the period (I will name it X). 

A / B = CURRENT RATIO

 

(A-X) / (B+X) = GOAL 

 

X = ? 

 

If you think you can help me, you can ilustration in excel:

Excel example Goal Seek 

 

Thanks in advance, 
Alex

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

Hi @astojanac ,

 

1.You can make current ratio as a measure: 

 

measure=Devide(MAX(A),MAX(B))

 

 

2.Then convert your X expression as below:

x=Devide((A-Goal*B),(Goal+1))

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @astojanac ,

 

1.You can make current ratio as a measure: 

 

measure=Devide(MAX(A),MAX(B))

 

 

2.Then convert your X expression as below:

x=Devide((A-Goal*B),(Goal+1))

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hi @v-kelly-msft T,

 

Thank you for your answer and thank you so much for your help. This is the formula I've been looking for. 

Kind regard, 
Alex

amitchandak
Super User
Super User

@astojanac 

In Powerbi, You have what-if parameter, see if it can help

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello @amitchandak ,

 

Thank you for your answer.
I know for What-if parameter, but I can't find the way to use it in my case when I have unknown value in two places at the same time. 

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.