Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Table.InsertRows based on a condition

I want to create a list of Architectural Sheets.

I have an input form, where an "x" means to create a sheet for that item.

 

In PowerQuery I map that Excel cell to a variable.

I am using the statement to insert a row for the sheet name.

 

= Table.InsertRows(#"GeneralSheets", 0, {[Sheet Name = "Overall Plan - Level 1"]})

 

However, I only want to insert the row, when the cell is checked with an "x"

Can I insert an if then else statement in this?

 

 

Thank you.

2 Replies

  • Anonymous , is adding a filter on that column is possible ?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I see what you mean. In other words, I can add all of the rows to correspond to the Excel form, and then filter the column storing the "x."

       

      Thanks!