Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello All!!
I have a situation, I hope someone could help me to understand this:
Im loading information from SAP HANA in Power BI, I want to load, all the information from the 2019 to the last day; I could have information from this year, and maybe other year (2020, 2021)
I use this in advanced editor:
{Cube.ApplyParameter, "IP_DATE_INIT", {"20190101"}},
{Cube.ApplyParameter, "IP_DATE_END", {DateTime.ToText(DateTime.LocalNow(),"yyyyMMdd")}},
In the IP DATE END I want to load all the information en the tables, for example i have information from 2019, to all 2020 and I dont know what function i can use.
Thanks for the comments
Best Regards
Monica
Solved! Go to Solution.
Hi @Anonymous ,
Check if getting the last day of the current year works for you:
DateTime.ToText(Date.EndOfYear(DateTime.LocalNow()), "yyyyMMdd")
Also you can use the Date.AddYears functions or query this max date of this base table in HANA and use it as parameter for this query, if necessary.
Hi @Anonymous
You could use power query parameter to select specific data from the database into Power bi.
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters
Please tell us if you what to define a specific date and then get data between this specific date and the year-end of this date.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Check if getting the last day of the current year works for you:
DateTime.ToText(Date.EndOfYear(DateTime.LocalNow()), "yyyyMMdd")
Also you can use the Date.AddYears functions or query this max date of this base table in HANA and use it as parameter for this query, if necessary.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.