Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I want to update in power query table only data form the last 4 weeks to minimize the time updating.
I have used this formula, but it only updates the data from the actual month.:
= Table.SelectRows(BME_LOSS_TREE_Table, each Date.IsInCurrentMonth([DATATIME_UTC]))
I try with this other formula, but it updates the data from the previous month, no data from this month :
= Table.SelectRows(BME_LOSS_TREE_Table, each Date.IsInPreviousNMonths([DATATIME_UTC];1))
I try to combine it by using && and || , but without result.
Thanks,
Laura
Solved! Go to Solution.
You need to use Date.IsInPreviousNWeeks for last 4 weeks. Hence, use below
= Table.SelectRows(BME_LOSS_TREE_Table, each Date.IsInPreviousNWeeks([DATATIME_UTC],4))
if you need dates of current week also to be considered
= Table.SelectRows(BME_LOSS_TREE_Table, each Date.IsInPreviousNWeeks([DATATIME_UTC],4) or Date.IsInCurrentWeek([DATATIME_UTC]))
Thank you!! What I need was your second option
You need to use Date.IsInPreviousNWeeks for last 4 weeks. Hence, use below
= Table.SelectRows(BME_LOSS_TREE_Table, each Date.IsInPreviousNWeeks([DATATIME_UTC],4))
if you need dates of current week also to be considered
= Table.SelectRows(BME_LOSS_TREE_Table, each Date.IsInPreviousNWeeks([DATATIME_UTC],4) or Date.IsInCurrentWeek([DATATIME_UTC]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.