Forum Discussion
Vincent2000
1 year agoNew Member
One segment filter applied on two columns
Hello everyone,
I would like to have the possibility to display information from my data however a date (year) is present in at least one of two columns with date.
For exemple with the following table:
| ProjectName | Year1 | Year2 |
| Proj1 | 2023 | 2024 |
| Proj2 | 2024 | 2024 |
| Proj3 | 2023 | 2023 |
| Proj4 | 2022 | 2023 |
| Proj5 | 2022 | 2022 |
If my segment filter is set to "2023", my page display the table with the lines containing 2023 wherever it is in column "Year1" or "Year2" :
| ProjectName | Year1 | Year2 |
| Proj1 | 2023 | 2024 |
| Proj3 | 2023 | 2023 |
| Proj4 | 2022 | 2023 |
Do you have any idea ?
Thank you
you can try this.
1. create a new table for filtering (do not create relationship with your fact table)
Table 2 = DISTINCT( union(DISTINCT('Table'[Year1]),DISTINCT('Table'[Year2])))2. create a measure
Measure = if(max('Table'[Year1])=max('Table 2'[Year1]) || max('Table'[Year2])=max('Table 2'[Year1]),1)then add this mesure to the visual filter and set to 1pls see the attachment below
1 Reply
- ryan_mayuSuper User
you can try this.
1. create a new table for filtering (do not create relationship with your fact table)
Table 2 = DISTINCT( union(DISTINCT('Table'[Year1]),DISTINCT('Table'[Year2])))2. create a measure
Measure = if(max('Table'[Year1])=max('Table 2'[Year1]) || max('Table'[Year2])=max('Table 2'[Year1]),1)then add this mesure to the visual filter and set to 1pls see the attachment below