Forum Discussion
Filter the column(s) values based on the slicer
Column1 Index Category ID
4908 1 A 123
4912 2 B 456
4915 3 C 789
4918 4 D 134
4922 5 E 178
4925 6 B 398
4928 7 F 549
4932 8 A 753
4935 9 D 497
4938 10 C 374
There is a slicer for Column1. If a value is selected in the slicer, then the values from one before the selected up to the end should be retrieved.
For example, if I select 4928, then I should get the values
4925 B 398
4928 F 549
4932 A 753
4935 D 497
4938 C 374
- Anonymous2 years ago
Hi deechappi ,
Please create an unreleated DimColumn1 table for slicer. Then create a measure to have a test.
Filter = VAR _SELECTVALUE = SELECTEDVALUE ( 'Filter'[Column1] ) VAR _VALUEBEFORE = CALCULATE ( MAX ( 'Table'[Column1] ), FILTER ( ALL ( 'Table' ), 'Table'[Column1] < _SELECTVALUE ) ) RETURN IF ( MAX ( 'Table'[Column1] ) >= _VALUEBEFORE, 1, 0 )Add this filter into table visual and set it to show items when value = 1.
Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- ray_aramburo
Super User
Something that I can think of is to change the Column1 type to numerical and use it as an slicer and set it up as a "greater than or equal to" type of slicer.
- deechappiFrequent Visitor
Thank You ray_aramburo . But, I would also like the one before the selected value as well
- ray_aramburo
Super User
You can adjust then to a "Between" type of slicer.
- AnonymousNot applicable
Hi deechappi ,
Please create an unreleated DimColumn1 table for slicer. Then create a measure to have a test.
Filter = VAR _SELECTVALUE = SELECTEDVALUE ( 'Filter'[Column1] ) VAR _VALUEBEFORE = CALCULATE ( MAX ( 'Table'[Column1] ), FILTER ( ALL ( 'Table' ), 'Table'[Column1] < _SELECTVALUE ) ) RETURN IF ( MAX ( 'Table'[Column1] ) >= _VALUEBEFORE, 1, 0 )Add this filter into table visual and set it to show items when value = 1.
Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.