Forum Discussion
Anonymous
5 years agoNot applicable
Slicer
Hello Guys, I may need some help on Slicers in Power BI Desktop. I want to Filter a table by year (2020, 2021 and so on). But some of the rows are assigned to multiple years, e.g. '2020; 2021'...
- 5 years ago
It sounds like you want to split the column in Power Query (using ; as the separator).
If you choose 'Rows' from the Advanced Section, it'll do what you want.
Let me know how you get on.
v-easonf-msft
Community Support
5 years agoHi, Anonymous
Try follow steps:
1.create a calculated table :
Slicer Table = DISTINCT('Table'[Year])
2.create a new measure
visualfilter =
VAR s_year =
SELECTEDVALUE ( 'Slicer Table'[Year] )
VAR t_year =
SELECTEDVALUE ( 'Table'[Year] )
RETURN
IF ( CONTAINSSTRING ( t_year, s_year ), 1, 0 )
3.apply this measure to visual filter pane
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.