Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Power Query Load all the data from start day to last day of the information

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

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

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.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

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.

camargos88
Community Champion
Community Champion

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.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

@camargos88  Thanks a lot for your comments

Its works perfect for me.

 

Thanks

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.