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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
effertz12
Helper I
Helper I

Power Query to only select this months column

I Have an excel File that contains products and supply orgs and etc. which are columns that i always want to load via power query. It also includes forecasted data for each month, and these contain months actuals and future months forecasts. We drop the previous year's months in the middle of the year, so the location of the current month column changes at certain points in the year. Is there a way to dynamically only bring in the current month's column while dropping the rest. In this example below the current month is in column AX, but in July it might be located in a different column. I have created dynamic headers to pull before but those always just choose the first X number of columns. I need a query to figure out which column contains this month and pull it dynamically. 

effertz12_0-1643299325848.png

 

2 REPLIES 2
mussaenda
Super User
Super User

Hi @effertz12 ,

 

Yes of course you can do it.

But you need to transform first your data.

 

You can Unpivot your columns and the change to the correct date type then filter to this month only.

 

If you have a sample data that we can work on, we can help you better.

Thanks

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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