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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.