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
vipett
Helper III
Helper III

Lookup in powerquery with IF

I today do a lookup in a dax-formula but would like to do this in powerquery instead.

 

Step 1:

In my Table "Forecast", I have a number of columns, but here two are important "Version" and "request month".

Each version contains 12 request months (rolling 12 months in the future).

Here I would like to indicate the latest version (highest value). it is in the format such as 2309 (YYMM) and formatted as value.

 

Step 2:

In another table, "Periods", I have all request months between 2001 and 2512 (YYMM again).

Here I want to check what periods are included in the latest forecast version, plus the previous one.

 

For example, the forecast version 2309  contains requests months, 2309,2310,2311,2312,2401,2402,2403,2404,2405,2406,2407,2408.

So if 2309 is the latest forecast version, I want a column saying "yes" on all those months above, plus the previous month, in this case 2308.

 

How do I do this?

1 REPLY 1
amitchandak
Super User
Super User

@vipett , In power query to look across table you can follow

 

Power Query Across Table calculated column https://youtu.be/InjrmY-LJdA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.