Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I am trying to create custom column here which will basically allow me filter data for last 4 days dynamically.
this is the query i am using but it is giving me error.
Data type of the modifiedon column is date/time.
Solved! Go to Solution.
@Anonymous,
Looks like you're missing a closing parenthesis at the end of the expression.
Proud to be a Super User!
@Anonymous You can dynamically filter for last 4 days without even creating a calculated column, just paste the below expression at the last line of your M code inside Advance Editor, make sure you include a "," above the Filtered Rows expression like below
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each
[YourDateColumn] >= Date.From(Date.AddDays(DateTime.LocalNow(),-4)) and
[YourDateColumn] <=Date.From(DateTime.LocalNow()))
in
#"Filtered Rows"
Did I answer your question? If yes, please mark my post as a solution.
Thanks,
Jai
Proud to be a Super User! | |
Hi @Anonymous
First of all, thanks to DataInsights and Jai-Rathinavel for their attention to this thread and great replies.
I would like to ask if the replies from DataInsights and Jai-Rathinavel have helped you to solve the problem? If so please consider accepting the helpful reply as a solution.
From the error message in your screenshot, it appears that “)” is missing from the end of your formula.
Here are some similar solved cases for your reference:
Solved: Date Filtering in Power Query - Microsoft Fabric Community
Solved: Filter As Per Last N Months, Current Month and Nex... - Microsoft Fabric Community
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous You can dynamically filter for last 4 days without even creating a calculated column, just paste the below expression at the last line of your M code inside Advance Editor, make sure you include a "," above the Filtered Rows expression like below
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each
[YourDateColumn] >= Date.From(Date.AddDays(DateTime.LocalNow(),-4)) and
[YourDateColumn] <=Date.From(DateTime.LocalNow()))
in
#"Filtered Rows"
Did I answer your question? If yes, please mark my post as a solution.
Thanks,
Jai
Proud to be a Super User! | |
@Anonymous,
Looks like you're missing a closing parenthesis at the end of the expression.
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.