Forum Discussion
Before and After using One Date
- 9 years ago
I figured it out, when I changed my date selector to the date within the combined table it works. I had it as my date table previously.
Hi RonHall,
According to what I understand you want to calculate the Before and After based on a slicer you made with the SelectedDate, to make this you need to know what is the selected date so in the dates table make this measure:
DateSelected = Max('Dates Table'[SelectedTable])
Now use this measure in your Before and after should look something like this:
Before = CALCULATE(COUNTROWS(Combined), DATESBETWEEN(Combined[Date], [DateSelected], [DateSelected]+90))
After = CALCULATE(COUNTROWS(Combined), DATESBETWEEN(Combined[Date], [DateSelected], [DateSelected]-90))
Regards
MFelix
- RonHall9 years agoFrequent Visitor
Thank you for the input, the measures work and the dates change when I select a new date from the drop down, but the bar chart where I have Before and After doesn't. It shows one set of data and does not change when I change the date in the drop down.