Hello,
I am having trouble adding a dynamic day value to the adddays funtion I keep getting the "Expression is invalid" error.
I would like to subtract days from today depending on an input from PowerApps.
This is my function for initialize a variable value,
You need to multiple the DaystoAdd output with -1 to get the negative number which when added with addDays function gives you the past date.
Pls use the below expression:
addDays(utcNow(),mul(int(outputs('DaystoAdd')),-1),'MM-dd-yyyy')
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional