Forum Discussion
Forecast graph based on user input
- 1 year ago
hello some_analyst
for your first post, input is a table that consisted of user input as your post above.
i am not sure but i assumed you have a way for user to write down their input.
User input should be in a form of table in PBI so you can get that dynamic value into calculation.
the input table in my pbix is a dummy table, so you need to change that table into user input table.
for your second post, in your screenshot, i assumed the negatif value is the problem and i assumed you put in 20 as input.
this probably happens because the value is zero instead of blank in 28 April 2025, so the value becomes negative (0-20=-20).
if this the problem, then lets make a tweak in the DAX by adding not equal to 0.
Pending Forecast =
var _MaxDate =
CALCULATE(
MAX('dim_date'[Week Start]),
FILTER(
ALL('Dummy'),
not ISBLANK('Dummy'[Pending])&&
'Dummy'[Pending]<>0
)
)
var _MaxValue =
MAXX(
FILTER(
ALL('Dummy'),
'Dummy'[Date]=_MaxDate
),
'Dummy'[Pending]
)
var _Input = SELECTEDVALUE('What-If-Parameter'[What-If-Parameter])
Return
IF(
SELECTEDVALUE('Dummy'[Pending])<>BLANK(),
SELECTEDVALUE('Dummy'[Pending]),
_MaxValue -_Input
)this should take the 1096 value as last value then deducted with 20 in 28 April 2025.
Hope this will help.
Thank you.
Hi some_analyst ,
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you
Hi some_analyst ,
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you