I have a dropdown in a power app that I would like to add a 'All' choice to.
Right now, my drowdown Items property is being populated from my datasource like this:
Distinct(DataSource, Counterparty)
This works fine, but I can't figure out how to add an "All" option to select all the available options
I have a dropdown in a power app that I would like to add a 'All' choice to.
Right now, my drowdown Items property is being populated from my datasource like this:
Distinct(DataSource, Counterparty)
This works fine, but I can't figure out how to add an "All" option to select all the available options
You can add an "All"
option by combining it with the distinct values from your data source. Try this in the Items
property:
Table({Result: "All"}) & Distinct(DataSource, Counterparty)
This ensures "All"
appears at the top while keeping the unique values from the data source. To filter based on the selection, use:
If(Dropdown1.Selected.Result = "All", DataSource, Filter(DataSource, Counterparty = Dropdown1.Selected.Result))
This way, selecting "All"
will show all records, while other selections filter the data accordingly.