Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kevinsray
Helper II
Helper II

Import Data Using Variable Filter

I am wondering if someone could help a noobie out.

 

I have a report where I am importing data from a table with 10+ years of data, and am using dateadd to get the last 3 years only.

However, what I really want to do is only get data from 1st Jan last year.

Is there any way to do this?

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@kevinsray 
You cannot filter before you importing, what you can do is filter the imported data to show last N years values.

The easiest way I can think of is Relative Date Slicer or Filter on the date column.

 

relative date.JPG


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
V-pazhen-msft
Community Support
Community Support

@kevinsray 
You cannot filter before you importing, what you can do is filter the imported data to show last N years values.

The easiest way I can think of is Relative Date Slicer or Filter on the date column.

 

relative date.JPG


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

AlB
Super User
Super User

@kevinsray 

Share some sample data that can be copied (not scree cap) and I will give the example

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

AlB
Super User
Super User

Hi @kevinsray 

You can do this best in Power Query. Filter the date so that you only keep dates after the day you want

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

OK. That sounds great.
But I am not sure how to do that.

Any chance that I could get an example?

@kevinsray 

See if this helps

https://community.powerbi.com/t5/Desktop/Filter-query-by-date-column/td-p/333186

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

I had a look, but I don`t want the last X months.
I want from 1st Jan last year (2019).
And when we get to 1st Jan 2021, it should automatically change to 1st Jan 2020., 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.