Forum Discussion
Automatically delete data from import
- 8 years ago
Hi Abduvali,
Instead of using SQL statement, you should also be able to simply use Date.IsInPreviousMonth function(M) in Advanced Editor to import data from now till 12 months ago. :smileyhappy:
#"Filtered Rows" = Table.SelectRows(dbo_DimDate, each Date.IsInPreviousNMonths([FullDateAlternateKey], 12)) in #"Filtered Rows"Regards
Hi miltenburger,
Are you trying to display information between these days only exp: 30-10-2016 till 5-11-2016???
Regards
Abduvali
Hi Abduvali,
Thanks for fast reply.
No I am displaying all the data from last 12 months. So for today this means the data from 6-11-2016 till 6-11-2017.
But my imported data still shows data from the weeks before that, and i want that data deleted.
- Abduvali8 years ago
Skilled Sharer
OK no need to delete anything just set a restriction under the Visual/Page or Report filters by dropping your date field in there:
- You can use relative date filtering like display data For the last 30 days or past calendar week only
- Advance filtering - display items when the date Is on or after (set date)
Advance FilteringRelative FilteringFilter Options
Hope this helps.
Regards
Abduvali
- miltenburger8 years ago
Helper V
I get what you mean, and i tried it, it works.
But the data is still in my imported data. And i want it deleted...
Got any ideas on this? (your solution works fine for now btw)
- Abduvali8 years ago
Skilled Sharer
Then just update your SQL query because you can't delete data from Dataset selectively, as Dataset is just a box whatever you put in there will sit there so must be done on query level. In your SQL query instead of saying DATE >= '01/01/2016' use DATE BETWEEN '01/01/2016' and '01/01/2017' that way, you will only have the data within your preferred date range.