Forum Discussion
STEVE_WT
1 year agoFrequent Visitor
Custom column to filter a date table dynamically
Hi I have a list of campaign which a user will choose from a drop down slicer. Each of these campaigns has a start and end date. I also have a standalone calendar table with a list of dates. I ...
- 1 year ago
This worked perfectly. It was causing a lot of stress! Thanks very much for helping.
Anonymous
1 year agoNot applicable
Hi STEVE_WT ,
You can create a measure.
FilteredDates =
VAR SelectedCampaign = SELECTEDVALUE(Campaign[CampaignName])
VAR StartDate = CALCULATE(MIN(Campaign[StartDate]), Campaign[CampaignName] = SelectedCampaign)
VAR EndDate = CALCULATE(MAX(Campaign[EndDate]), Campaign[CampaignName] = SelectedCampaign)
RETURN
IF(MAX(Calendar[Date]) >= StartDate && MAX(Calendar[Date]) <= EndDate,1)
Then drag it to the date table visual filter to filter data with a value of 1.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
STEVE_WT
1 year agoFrequent Visitor
This worked perfectly. It was causing a lot of stress! Thanks very much for helping.