Forum Discussion
Filter to select only Friday
I have 2 columns in my data - Week & Sales. Week column contains dates with only Friday. However, when I put a week at the top as a slicer (filter), it gives an option to the user to select all the dates instead of just Friday. I want that the user can select only Friday and the other dates/days get greyed out (or the user cannot select them). Is it possible?
I have placed the PBI with sample data here - https://drive.google.com/file/d/1YVeWPCMAud2LaEr3TJqFY6XaRZ1YsvT_/view?usp=sharing
- Anonymous5 years ago
Hi itsmeanuj ,
You will need to use list format.
Create a new table as slicer.
week = DISTINCT(Sheet1[Week])Then create a measure.
Measure = var min_week = MIN(week[Week]) var max_week = MAX(week[Week]) var selected_week = SELECTEDVALUE(Sheet1[Week]) return IF(selected_week>=min_week&&selected_week<=max_week,SELECTEDVALUE(Sheet1[Sales]),BLANK())Result would be shown as below.
Best Regards,
Jay
3 Replies
- amitchandak
Super User
itsmeanuj , if you put range slicer they can. You have to use list in place of range.
- AnonymousNot applicable
Hi itsmeanuj ,
You will need to use list format.
Create a new table as slicer.
week = DISTINCT(Sheet1[Week])Then create a measure.
Measure = var min_week = MIN(week[Week]) var max_week = MAX(week[Week]) var selected_week = SELECTEDVALUE(Sheet1[Week]) return IF(selected_week>=min_week&&selected_week<=max_week,SELECTEDVALUE(Sheet1[Sales]),BLANK())Result would be shown as below.
Best Regards,
Jay