Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I am trying to filter the date range in PowerQuery to show the dates in the next 30 days, including today. Date field is called: dd-date
I have tried:
Table.SelectRows(#"Filtered rows 1", each [#"dd-date"] >= DateTime.LocalNow() and [#"dd-date"] <= ( DateTime.LocalNow() + 30))
Table.SelectRows(#"Filtered rows 1", Date.IsInNextNDays(Date.AddDays(DateTime.FixedLocalNow(), 1), 30)
Solved! Go to Solution.
Please try this expression instead, confirming the name of your previous step and your date column name. Just replace the line you showed with this in the Formula Bar. You can auto generate this line by using the pull-down filter on your date column, choose Date Filters, and "In the Next".
= Table.SelectRows("Filtered Rows 1", each Date.IsInNextNDays([dd-date], 30))
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I just tried this and receive a Timeout error:
Table.SelectRows(#"Filtered rows 1", each [#"dd-date"] = Date.IsInNextNDays(Date.AddDays(DateTime.FixedLocalNow(), 1), 14))
Please try this expression instead, confirming the name of your previous step and your date column name. Just replace the line you showed with this in the Formula Bar. You can auto generate this line by using the pull-down filter on your date column, choose Date Filters, and "In the Next".
= Table.SelectRows("Filtered Rows 1", each Date.IsInNextNDays([dd-date], 30))
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
No code errors now, but continue to receive a timeout error.
Thanks for your help.