Hi,
I've read a lot of things about dates and dropdown but I can't figure out how to achieve this.
I want to use the CreationDate to filter a Gallery. Easy. But I want in my dropdown a distinct and only the dates so it becomes :
From
01/12/2020 16:52:00
01/12/2020 17:20:00
13/12/2020 09:22:00
14/12/2020 13:12:00
14/12/2020 14:15:00
18/12/2020 10:10:00
To
01/12/2020
13/12/2020
14/12/2020
18/12/2020
And when I select in the dropdown 14/12/2020 it display in my gallery the Two corresponding records.
I've tried to build a collection, I've tried to add a column,... I'm stuck.
Thanks for your help,
Olivier
Solved! Go to Solution.
Hi @osaunier ,
@Drrickryp 's solution is great, but with a minor hitch on Filter formula.
The Dropdown1.Selected.Result return the Short Date Text, so an incompatible type error occurs in the filter formula. Please modify the formula as follows.
Filter(AddColumns('Table',"shortdate",Text('CreationDate',ShortDate)),'shortdate'=Dropdown1.Selected.Result)
Hope this helps.
Sik
Hi @osaunier
Distinct(
AddColumns(
ds,
"shrtdate",
Text(
'CreationDate',
ShortDate
)
),
shrtdate
)
and in the Value dropdown on the right column, select Result to show in the window. Filter your gallery with
Filter(ds,'CreationDate'=Dropdown1.Selected.Result
Replace ds with the name of your data source.
Hi @osaunier ,
@Drrickryp 's solution is great, but with a minor hitch on Filter formula.
The Dropdown1.Selected.Result return the Short Date Text, so an incompatible type error occurs in the filter formula. Please modify the formula as follows.
Filter(AddColumns('Table',"shortdate",Text('CreationDate',ShortDate)),'shortdate'=Dropdown1.Selected.Result)
Hope this helps.
Sik
Thanks to the both of you @v-siky-msft & @Drrickryp , it's working!! I understand my mistake with the AddColumn into the Filter that I wasn't using.
Thanks again, I can move forward 🙂
User | Count |
---|---|
239 | |
114 | |
94 | |
58 | |
32 |
User | Count |
---|---|
286 | |
133 | |
106 | |
63 | |
57 |