Forum Discussion
Filter table date with Isfiltered
HI Team,
I have below table
| Date | Comments | Category |
| 1/1/2023 | Helllo | A |
| 1/1/2023 | Hiiiiii | A |
| 2/1/2023 | Hello,testing | B |
| 3/1/2023 | hellllll | A |
If a slicer is filtered then show only rows where date is 16 days from today else show everything.
How to achive this using a measure??
Hi,
1st create a separate slicer table using table functions. E.g.Then create a measure like this:
FIlter if is filtered = IF(OR(ISFILTERED('Slicer table'[Comments]),ISFILTERED('Slicer table'[Category])),IF(COUNTROWS(FILTER('Table (21)', [Date]>=TODAY() && [Date]<=TODAY()+16))>0,1,0),1)Now place it into a visual like this:
Then If you select a slicer from the slicer table the measure will work:
To get the slicers to function with your table e.g. so that category slices category from your fact table repeat the logic like this:
Category slicer = IF(ISFILTERED('Slicer table'[Category]),IF(MAX('Table (21)'[Category])=MAX('Slicer table'[Category]),1,0),1)Now the previously shown row is not shown since the row had category = A.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
1 Reply
- ValtteriN
Community Champion
Hi,
1st create a separate slicer table using table functions. E.g.Then create a measure like this:
FIlter if is filtered = IF(OR(ISFILTERED('Slicer table'[Comments]),ISFILTERED('Slicer table'[Category])),IF(COUNTROWS(FILTER('Table (21)', [Date]>=TODAY() && [Date]<=TODAY()+16))>0,1,0),1)Now place it into a visual like this:
Then If you select a slicer from the slicer table the measure will work:
To get the slicers to function with your table e.g. so that category slices category from your fact table repeat the logic like this:
Category slicer = IF(ISFILTERED('Slicer table'[Category]),IF(MAX('Table (21)'[Category])=MAX('Slicer table'[Category]),1,0),1)Now the previously shown row is not shown since the row had category = A.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/