Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
I need to extract last 1 year of data from source based on current date .
Thanks in advance for solution.
Solved! Go to Solution.
@AOD , add a filter like this in power query
= Table.SelectRows(#"Changed Type", each [Sales Date] <= DateTime.Date(DateTime.LocalNow()) and [Sales Date] >= Date.StartOfMonth(Date.AddMonths( DateTime.Date(DateTime.LocalNow()),-12)) )
Hi @AOD ,
When you use Power BI (at least these days), the default option after selecting your tables is Load. If you just load data directly, then the entire data rows in that table (it might be 20 years of data or 50 million rows), will be loaded into the memory.
Please try to use TransForm data.
Then filter the data in Power Query according to date.
More details:Only Get the Last Few Periods of Data into Power BI using Power Query Filtering
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@AOD , add a filter like this in power query
= Table.SelectRows(#"Changed Type", each [Sales Date] <= DateTime.Date(DateTime.LocalNow()) and [Sales Date] >= Date.StartOfMonth(Date.AddMonths( DateTime.Date(DateTime.LocalNow()),-12)) )
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
96 | |
89 | |
73 | |
61 | |
58 |