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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
CostaBella
Frequent Visitor

Date Splitter

I have a database that has a date column i am trying to manipulate. I need to be able to search the database for a particular month and year, the day is not important. When i refresh i want to be able to pick a month and year and only show me the information for said month(s) and year.

 

Thanks for any advice!

1 ACCEPTED SOLUTION
adudani
Super User
Super User

@CostaBella ,

 

After connecting to the object in the database.

 

create a column month year , or two columns year and month and filter the data you want in Power Query?

 

 

else, 

 

while connecting to the database, you should be able to to filter before connecting as well. 

 

example in SQL server using T sql in the advanced options:

 

adudani_0-1674139093964.png

 

Please let me know if this resolves the query.

 

Appreciate a thumbs up if this is helpful

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

View solution in original post

1 REPLY 1
adudani
Super User
Super User

@CostaBella ,

 

After connecting to the object in the database.

 

create a column month year , or two columns year and month and filter the data you want in Power Query?

 

 

else, 

 

while connecting to the database, you should be able to to filter before connecting as well. 

 

example in SQL server using T sql in the advanced options:

 

adudani_0-1674139093964.png

 

Please let me know if this resolves the query.

 

Appreciate a thumbs up if this is helpful

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors