Forum Discussion
Filter using custom date options
Hi,
Apologies, please bare with me, quite new to all of this!
Ok, very usefully, I've now been able to see my measure, DateCategory, in action by adding it to a simple report. When I change my Date Category slicer, I can see that the measure dynamically updates, putting a 'Y' in all cells that match the selection. So if I select "This Week", I get two Y's, mimicking the two Y's in my This Week column:
All I need to do now is to be able to filter on this measure, so only those two records are used - but it seems you can't. Am I close or going about this all wrong?!
Thanks
Mark
Hi Mark,
It seems the measure worked. What's the issue? Do you mean the table visual should only show two rows and hide the other rows?
Best Regards,
Dale
- MarkSL8 years agoHelper V
Hi Dale,
Thanks for taking a look and yes that is correct, I want the table to be filted to those two rows, thereby also filtering my main data table which is joined to the date table, to only return data for those two dates.
Perhaps using this method is not viable?
Thanks
Mark- v-jiascu-msft8 years agoMicrosoft Employee
Hi Mark,
That's because there are many other columns. Maybe you can use the filters.
Best Regards,
Dale
- MarkSL8 years agoHelper V
Hi Dale,
No that doesn't change it and I think I may have confused things. Let me try to simplify my query...
I want to offer the users a filter on date. I don't want to use the Relative Date Slicer as it offers options which are not suitable for my need. I therefore want to offer the user a specific list of date options which will be applied to the date column SalesDate in my main sales table:
So I essentially need a method of saying..
If Category = "Today", then filter SalesDate = TODAY()
If Category = "Yesterday", then filter SalesDate = TODAY()-1
etc.
Thanks
Mark