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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
StrPod
Frequent Visitor

How to make range parameter to dynamically use current date?

Hi, I have implemented power bi incremental refresh using the RangeStart and RangeEnd parameter. is there a way to make the RangeEnd parameter to dynamically use the current date (DateTime.LocalNow()). The parameter value box only takes datetime value.


the reason I want this is so that when I get a new data and I want to do transformation I don't want manually change the RangeEnd date everytime to see the data in PQ editor preview and the data view.

1 REPLY 1
lbendlin
Super User
Super User

That's not how incremental refresh works.  The values for RangeStart and RangeEnd in Power Query have absolutely no correlation to the partition rules created in the Power BI interface for your table  (say, keep last 5 years and refresh last two months). These values in Power Query can be anything and are usually used to give the report developer just enough data to work with the visuals etc (for example when you need to do a Year over Year calculation).

 

There is a special case when the RangeStart is in the future but you still need to fill the partition. That is handled via XMLA script.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.