Hi, I'm trying to create a dynamic filtering on a gallery/table and I'm a little bit lost so it would be great if someone can help.
In my scenario I have a table with 3 columns:
| Level 1 | Level 2 | Level 3 |
| A1 | B1 | C1 |
| A1 | B1 | C2 |
| A1 | B2 | C3 |
| A1 | B2 | C4 |
| A2 | B3 | C5 |
| A2 | B3 | C6 |
| A2 | B4 | C7 |
| A2 | B4 | C8 |
Now I would like to have 3 dropdowns to filter this table with the distinct values of each columns, with the following functionality:
- The values are unique
- The values depend on the previous level selected date.
For example:
- the items for L1 dropdown are A1 and A2 - always
- the items for L2 dropdown are B1, B2, B3, B4 - but if I select in L1 A1 I will see only B1 and B2. If I select in L1 A2 I will see only B3 and B4.
- the items for L3 dropdown are C1 .. C8 - but If I select A2 and B4 I will see only C7 and C8.
At the end, when you selected in the dropdowns A1-B1-C1, you will see the record in the table below.
At the moment I am able to see the items using Distinct(Collection,Column) but I am not sure on how to filter it in the second level.
I've tried to use the OnChange property of the L1 Dropdown to something like L2.Items=Distinct(Filter(Collection, L1=L1.Selected),L2) // Syntaxis only for reference // but it is not working
Any idea on how I can achieve this?
Many thanks