The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone,
for using the incremental refresh function, I am trying to add a column to my dataset, which adds automatically the date when the upload was made and Power BI keeps the data that’s already in my dataset and add new data to it. I added the following M-Code to Power Query but I get the error message "missing identifier".
let
//Find the current date and time when this query runs
CurrentDateTime = DateTimeZone.FixedUtcNow(),
//Find yesterday's date
PreviousDay = Date.AddDays(DateTime.Date(CurrentDateTime),–1),
//Put the current date and time in a new column in the table
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "UTC Data Load Date", each CurrentDateTime),
#"Changed Type3" = Table.TransformColumnTypes(#"Added Custom",{{"UTC Data Load Date", type datetimezone}}),
//Add the filter required for incremental refresh
//Only return rows in this table if:
//a) The RangeStart parameter equals yesterday's date, and
//b) RangeEnd is not null (which should never be true)
#"Filtered Rows" = Table.SelectRows(#"Changed Type3", each DateTime.Date(RangeStart)=PreviousDay and RangeEnd<>null)
in
#"Filtered Rows"
That's not how incremental refresh works. Incremental Refresh expects immutable data (that won't change after it is written) and it expects RangeStart and RangeEnd to define partition boundaries. The typical usage pattern is
RangeStart <= [Created Date] and [Created Date] < RangeEnd
You seem to be looking for a different refresh type.