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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
DSR
Resolver I
Resolver I

How to refer to previous step in Custom Function when it is in subtable

Hello, your help please,
 
in creating and using the Custom Function the PreviousStep is "Col.IndexSub" which is inside "FullTable" I want to access it when invoking the Function on the left, but the box shows queries outside.How to refer to previous step in Custom Function.png

3 REPLIES 3
DSR
Resolver I
Resolver I

How to refer to previous step in Custom Function.png

How to refer to previous step in Custom Function Code.png

See how you have nested "each"  ?  That's asking for trouble.  The Power Query engine can be confused and grab data from the wrong context. Use function notation instead.

lbendlin
Super User
Super User

Learn about scope - the Power Query equivalent of context.  You can use function notation instead of "each"  to clearly identify your context layers and address items in each.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors