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
Hello Everyone,
I have to pass two required parameters StartDate and EndDate at the BEx query level. If I pass Start Date as "20220101" and EndDate as "20220131", these values are fixed in the parameters section. What I'm looking at here is how can I achieve a rolling 24 months of data based on the current date when data flow is refreshed daily. What changes do I have to make in the advanced editor for making this query to bring back rolling 24 months of data from the source system?
For Example: If the data flow is refreshed today (08/23/2022), It has to bring all the data from 08/23/2020 - 08/23/2022.
Any suggestions are much appreciated.
@praveenk , Use these two dates
Let
StartDate =Date.AddMonths(DateTime.Date( DateTime.FixedLocalNow()),-24),
EndDate= DateTime.Date( DateTime.FixedLocalNow()) ,
<Use these two in you code now>
I don't see the data beyond the parameter's value after adding those two lines to the code. Do I have to remove the date values and substitute them with the StartDate and EndDate?
@praveenk , Those two date values you try to use these parameters
if needed convert to text
Date.ToText([StartDate],"yyyyMMdd")
replace 20220101 and the other date and check if it works
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
111 | |
75 | |
57 | |
52 | |
44 |
User | Count |
---|---|
157 | |
113 | |
63 | |
60 | |
50 |