Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |