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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
MagikJukas
Resolver III
Resolver III

Add column previous step (drill-down)

Hello,

 

I have query where I created some intermedieries steps calculating a value, which has been drilled down. This step is called "Prior".

 

In the same query, I have a table and I want to add this drill-down value as a column.

 

This is the code I passed: Table.AddColumn(#"Removed Columns", "Custom", each (#"Query1"[Prior])).

I am not sure why it does not work?

 

Meanwhile, I created a second query that give the same value as the "Prior" step in Query1.

If in Query1 I link it to Query2, it works: Table.AddColumn(#"Removed Columns", "Custom", each (#"Query2")).

 

So the question is, how can I link it to a previous step without creating a second query?

 

thanks

 

1 ACCEPTED SOLUTION

Thanks, but I found it too complicated. 

I replicated the original formulas within the column.

View solution in original post

4 REPLIES 4
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

This should be like below where Prior is the last step and Sales is the column which was drilled down

Table.AddColumn(#"Removed Columns", "Custom", each Prior[Sales])

 

If the step which generated the list is named test, then use following

= Table.AddColumn(#"Custom1", "Custom", each test)

In the second query, you are referring to the last result which is a list which will work in Query1. In above Prior[Sales] is the list.

Not sure I understood correctly.

First of all, "Prior" step has been drilled down. so there is only one value associated with that step.

 

I tried to pass the following: Table.AddColumn(#"Removed Columns", "Custom", each Prior), but I got the Forumla.Firewall error.

 

I am looking on the internet to figure out how to solve it...

any idea?

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

If this is a single value list.

Table.AddColumn(#"Removed Columns", "Custom", each Prior{0})

 

For formula.firewall - https://docs.microsoft.com/en-us/power-query/dataprivacyfirewall 

Thanks, but I found it too complicated. 

I replicated the original formulas within the column.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.