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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
darkstaarx
Regular Visitor

DAX calculator for goal where denominators and numerator increase simultaneously

Hi all, 

 

I am not sure how to describe this better but it is possible to build a DAX to find "x" in this equation? 

 

Example:

(20+x)/(55+x)=7/10

Answer should be: 61.6 or 62.

 

The reason why I want this calculation is because our goal is 70%.

 

Assuming that we at 20/55=36%, how many more to achieve if numerator and denominators increase simultaneously. The answer should be 62 more to achieve min 70% which is (20+62)/(55+62).

 

In actual world, there's duration involved but I do not wish to make it more complex for now. 

 

Thank you in advance! 

5 REPLIES 5
eliasayy
Impactful Individual
Impactful Individual

Hello @darkstaarx if i understood correctly lets say you have a table with the columns: date, number 1, and number 2

 

You want to first divide number 1 with number 2 if you select the slicer of a date for example and then if this number isnt equal or greater than 0.7, then you want to create this equation.

 

Unfortunately, dax doesnt support placing unknowns like x and y and solve equations at the moment 

Yes, you are right and thanks for the answer. Is there any alternative way to calculate this. I would accept long solution if that something DAX can offer.

eliasayy
Impactful Individual
Impactful Individual

In my experience powerbi cant solve those equations, the only solution you can do is to do them manually and add them as a new column to do the calculation but you need a true integer 

Noted, then I will just hold my thought first for this one. Thanks!

Greg_Deckler
Super User
Super User

@darkstaarx Sure, if my algebra serves:

(20 + x) / (55 + x) = .7

.7(55 + x) = 20 + x

.7(55) + .7x - 20 - x = 0

-.3x = -.7(55) + 20

.3x = .7(55) - 20

x = (.7(55) - 20 ) / .3


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.