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
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
Super User
Super User

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?

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
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.