Hi @Skybluekid,
Unfortunately dynamic column selection is not possible within Power Apps. Some delegable workarounds I know of are:
(1) Using a Switch() statement with Filter() statements as output
Switch(
dropdown.Selected.Value,
Blank(),
Table,
//Change "Column 1" to one of the values within your dropdown
"Column 1",
//Change Column1 with the corresponding column name
Filter(Table, Column1 = Blank()),
"Column 2",
Filter(Table, Column1 = Blank())
)
Note: You could also use the Switch within your Condition. In this case you don't have to rewrite the Filter statement but this approach will lead to a non-delegable query.
(2) 'Dynamic' selection by adding && and || statements that check both the column and dropdown
Filter(
Table,
dropdown.Selected.Value = Blank() ||
(dropdown.Selected.Value = "Column 1" && Column1 = Blank()) ||
(dropdown.Selected.Value = "Column 2" && Column2 = Blank())
)
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!