March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have package information as below with their dates
Package | Date |
ABCD1234 | 1-Sep-21 |
null | 1-Sep-21 |
ABCD1234 | 1-Sep-21 |
ABCD1234 | 9-Oct-21 |
ABCD1234 | 1-Oct-21 |
null | 10-Oct-21 |
ABCD1234 | 9-Oct-21 |
null | 10-Oct-21 |
null | 10-Oct-21 |
ABCD1234 | 10-Oct-21 |
MNOP5678 | 15-Sep-21 |
MNOP5678 | 20-Oct-21 |
null | 15-Sep-21 |
MNOP5678 | 1-Oct-21 |
MNOP5678 | 10-Oct-21 |
MNOP5678 | 10-Oct-21 |
null | 10-Oct-21 |
MNOP5678 | 1-Oct-21 |
null | 10-Oct-21 |
null | 10-Oct-21 |
MNOP5678 | 15-Sep-21 |
MNOP5678 | 10-Oct-21 |
I need assistance with how I can remove rows that are older than 30 days from current date (Current date - date in table > 30 should be deleted) while retaining null value rows, in Power query.
Thanks in advance!
Regards,
Muralidhar
Solved! Go to Solution.
= Table.SelectRows(#"Changed Type1", each [Package] = null or [Date] > Date.AddDays(DateTime.Date(DateTime.FixedLocalNow()),-30))
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Hi @murali5431
this should work
= Table.SelectRows(#"Changed Type1", each [Date] > Date.AddDays(DateTime.Date(DateTime.FixedLocalNow()),-30))
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Thank you @mwegener
Can you let me know how to retain the rows having "null" in column A. I believe that was not considered in the above query
= Table.SelectRows(#"Changed Type1", each [Package] = null or [Date] > Date.AddDays(DateTime.Date(DateTime.FixedLocalNow()),-30))
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
9 |
User | Count |
---|---|
36 | |
31 | |
20 | |
19 | |
17 |