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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
smpa01
Super User
Super User

Referencing query upto a certain step

Hi,

 

When a a query is refernced it brings the whole query. I was wondering if it possible at all to reference a query upto a certain step.

 

For example, suppose query "Q1" has 10 steps applied in it such as Step1, Step2, Step3...Step10.

 

I want to reference "Q1" in a way so that it bringsonly Step1-Step7.

 

Is there currently a way to do that?

 

Thank you in advance

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
4 REPLIES 4
Stachu
Community Champion
Community Champion

that's only possible withing the query itself so e.g. step11 can reference step7 & step12 can reference step10 & step11
assuming what you describe is concerning multiple queries I would do the following
1) create Q1_1-7 covering steps 1 to 7
2) change Q1 to reference Q1_1-7 and then add steps 8-10
3) reference Q1_1-7 in the other query



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

@Stachuthanks for your reply. I am sorry I did not get it. Can you elaborate with an example please.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

Yes, that's a really confusing reply!

Stachu
Community Champion
Community Champion

say this is your Q1 query, and you want to reference step Custom3
Q1 - original syntax

let
    Source = 1,
    Custom1 = Source+1,
    Custom2 = Custom1+1,
    Custom3 = Custom2+1,
    Custom4 = Custom3+1,
    Custom5 = Custom4+1
in
    Custom5

I duplicate the query, and remove evything after Custom3, and name it
Q1_1-3

let
    Source = 1,
    Custom1 = Source+1,
    Custom2 = Custom1+1,
    Custom3 = Custom2+1
in
    Custom3

I change Q1 to reference the new query, tthis way if steps 1-3 change I only need to make it once
Q1 - new syntax

let
    Source = #"Q1_1-3",
    Custom4 = Source+1,
    Custom5 = Custom4+1
in
    Custom5

in the query that was supposed to reference till step3 I reference Q1_1-3 instead of Q1

does it make sense now?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.