Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Solved! Go to Solution.
@Fadwa ,
What-if parameter may meet your requirement, please refer to doc below:
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The information you have provided is not making the problem clear to me. Can you please explain with an example. Can you share sample data and sample output.
Appreciate your Kudos.
I don't know how to explain it because it is a privet data
But the idea is I have a dashboard build in an excel macro model (Dashboard, model, controls... sheets)
So I kinda build the dashboard again to the power bi but with DAX
Like if I want to represent an average of any number that the user choose on power bi dashboard, I've to make:
To be like this: https://drive.google.com/file/d/1_XKEQk_22yaCDbufX2cgGnPxdbaXR_zA/view?usp=sharing
And go on for the rest of the equations
The problem is one of the cells on Excel (named Vu) give me a number so I built many equations on that number, but then I figure out that is not a value of a stable number, its a result of changing range on goal seek function:
Range("DIFF").GoalSeek Goal:=0, ChangingCell:=Range("VU")
which I mentioned before
@Fadwa ,
I'm confused on your description, could you please share some sample data and clarify the logic of your requirement using some expressions?
Regards,
Jimmy Tao
I need to convert this VBA macro code to power bi
Sub Calculate()
'
' Calculate Macro
'
'
Sheets("Model").Select
Range("DIFF").Select
For i = 1 To 10
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("DIFF").GoalSeek Goal:=0, ChangingCell:=Range("VU")
Sheets("Mortgage").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("DIFFMORTG").GoalSeek Goal:=0, ChangingCell:=Range("MORTG")
Next
Sheets("Dashboard").Select
Range("Start").Select
End Sub
@Fadwa ,
Could you share the sample data and show the expected result so that I can help you?
Regards,
Jimmy Tao
Hi again!
Thank you everyone! I really appreciate your efforts
I couldn't upload any picture before so I may have failed in explaining my idea + English is not my first language
So I simplify it to level 0
for example here is the excel file and my idea of goal seek (L-R=0) which means L = R
(R/L equations is much complicated on my excel macro model - its more like a study)
Here is the macro - VBA of the goal seek function
And here is the way I converted it into power bi - DAX
I want to make sure that whatever I put into L/R equations its always gonna be equals by using v value to balance them
Is there any function that could change the Goal value to be 0 by changing the v value automatically?
There is no data, it's only an equations
@Fadwa ,
What-if parameter may meet your requirement, please refer to doc below:
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.