The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I've been trying to pass a parameter in a json url to have the FromDate back to 04 months, for example, but it keeps bringing the whole year.
initialDate="&Date.ToText(DateTime.Date(Date.AddMonths(DateTime.LocalNow(), -MonthParameter)))
It results in the correct date, but I guess there is something wrong with the format it's brought in: 29/07/2019, while the original, static date was yyyy-MM-dd.
Any help will be appreciated.
Cheers,
Antonio
Solved! Go to Solution.
...it really turned out to be a formatting issue. The date had then to be like the following:
dataInicial="&Date.ToText(DateTime.Date(Date.AddMonths(DateTime.LocalNow(), -MonthParameter)), "yyyy-MM-dd")&...
...thanks to @beginner coder on stackoverflow.
Cheers,
Antonio
...it really turned out to be a formatting issue. The date had then to be like the following:
dataInicial="&Date.ToText(DateTime.Date(Date.AddMonths(DateTime.LocalNow(), -MonthParameter)), "yyyy-MM-dd")&...
...thanks to @beginner coder on stackoverflow.
Cheers,
Antonio
Hi @Asantos2020 ,
Glad to hear that you have resolved your problem. Would you please kindly mark your sharing solution as an answer so that it can benefit more users?
Please do not hesitate to ask here if you have any further question.
Best regards,