Forum Discussion
Period filter with custom date range option
I want to have an option for a custom date range on a report as in the screenshot below.
The issue I have is if a user first selects a custom date range (UK based dates), e.g. 01/04/2018 to date (08/05/2018). and then selects a time period e.g. This Year, as in the screenshot below, the Custom Date Range filter still applys when selecting a Period.
What I want to happen is for the visual to only respect the Custom Date Range if Custom Range option in the Period slicer is selected or if nothing is selected in the Period slicer. I have a feeling the answer to this is going to be a no but thought I'd make sure.
I appricaitate that I can use relative date slicers and this ultimately might have to be the way I go but I'm trying to keep this as simple as possible for the end user and the Period slicer seems to be the way based off their feedback.
The May update resolved the issue (source: https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-may-2018-feature-summary/#slicerSync)
5 Replies
- v-juanli-msftCommunity Support
Hi
As you referred, “the visual to only respect the Custom Date Range if Custom Range option in the Period slicer is selected or if nothing is selected in the Period slicer”
Create a calculated column
Column = IF ( [PERIOD] = "Custom Range", [date], BLANK () )
Assume the column added to the Custom Date Range slicer is named [date],
Then add this column to the Custom Date Range slicer instead.
Best Regards
Maggie
- mark_carlisleAdvocate IV
Hello Maggie,
Would you be able to attach an example .pbix file? What you suggest isn't working for me.
Thanks
- v-juanli-msftCommunity Support