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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.