0
votes

I have the following table with three columns A, B, and C on PowerBI, from which I want to select columns A and B to create a new table.

And looking from the equivalent in Pandas to:

table_2 = table1[["A","B"]]

or from SQL:

SELECT A,B FROM table1;

But I'm not finding the equivalent function on Power BI; the SELECTCOLUMNS function is used to create a new column as stated in the docs:

Adds calculated columns to the given table or table expression.

1

1 Answers

2
votes

The SELECTCOLUMNS function works fine for this. It allows you to create more complex calculated columns, but you can simply use the column itself as the calculation definition.

This should do the trick:

SELECTCOLUMNS(table1, "A", table1[A], "B", table1[B])