The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want the EngBOMInspDate column to automatically display records that contain dates between a certain date range. So if today is 3/19/2024 it would show the records from 3/5/2024 to 3/12/2024. Another example, if its 3/22/2024, I'd want it to show the records from 3/11/2024/ to 3/15/2024.
Solved! Go to Solution.
Hi @alopez802 ,
Based on your example, I'm struggling to understand the logic you're going for - your first example is asking for 8 days of data ending 7 days ago, the second example is asking for 5 days of data ending 4 days ago.
The basic structure you need would be something along these lines, but you'll need to adjust to fit your logic or give me some more detail about how you want it to work:
Table.SelectRows(
PreviousStepName,
each let __dtToday = Date.From(DateTime.LocalNow()) in
[EngBOMInspDate] >= Date.AddDays(__dtToday, -14)
and [EngBOMInspDate] <= Date.AddDays(__dtToday, -7)
)
// Filters a segment of data 7 days in duration, starting from two weeks before today's date.
// Adjust to fit your logic.
Pete
Proud to be a Datanaut!
Hi @alopez802 ,
Based on your example, I'm struggling to understand the logic you're going for - your first example is asking for 8 days of data ending 7 days ago, the second example is asking for 5 days of data ending 4 days ago.
The basic structure you need would be something along these lines, but you'll need to adjust to fit your logic or give me some more detail about how you want it to work:
Table.SelectRows(
PreviousStepName,
each let __dtToday = Date.From(DateTime.LocalNow()) in
[EngBOMInspDate] >= Date.AddDays(__dtToday, -14)
and [EngBOMInspDate] <= Date.AddDays(__dtToday, -7)
)
// Filters a segment of data 7 days in duration, starting from two weeks before today's date.
// Adjust to fit your logic.
Pete
Proud to be a Datanaut!