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
Anonymous
Not applicable

advanced power query code

Not sure if this is really "advanced", but here is what I am trying to accomplish. 

 

I have a table with a column for "locked forecast month", and another column for "requested ship date".  

 

Our business logic requires us to look 2 months out...and compare how we forecasted against the "locked" month.   So for example, all opportunities that were "locked" as of November 2020, will be compared against what was actually ordered during the "requested ship date" period of  January 2021.     So for this reason, I want to essentially get Power Query to look at the Locked Forecast Month  (which is a date column), and then filter the Requested Ship Date column by 2 months in advance.   

 

So for example:  If Locked Forecast Date  = November 2020, then filter Requested Ship Date by Locked Forecast Date + 2 months  (keep in mind the locked forecast date column is just month and year, but requested ship date is actual dates).  

 

Is this possible?  

 

 

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous 

It seems that you want to get dynamic custom column in Power Query. I think Power BI doesn't support you to ceate dynamic column. You may try measure in report view. According to your statement, I know you want  [requested ship date] show dates in Month +2 month. Will this return multiple answers? Could you show me a screenshot about the result you want?  This may make it easier for me to understand your requirement.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.