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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Always load last 12 months

Hi

 

I'm doing a data model, and I need it to load always the last 12 months.

So far I've added a variable and I can add the first date to load. But this date is manually added and is never updated, unless I change it.

 

How can I add a variable or something, to always load the last 12 months?


Thanks!

4 REPLIES 4
amitchandak
Super User
Super User

Are you talking about data load or page/report.

 

There you can drag a date at report of page-level and use the relative option to control data for 2 years

Anonymous
Not applicable

I'm talking about data load, from database, not from data in a report!

Hi @Anonymous  

you can use relative date filters in the query editor via the UI like so:

 

image.png

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.