Forum Discussion
Calculation Filter working when using Today Function, but not when I use a calculated date
- 10 months ago
Hi again cjbaguley
Thanks for sharing the PBIX!
I had a look and the measure itself actually seemed to be working correctly, however some visual interactions were disabled in the report page, which meant the card visual wasn't updating based on filters.
Nonetheless, I would recommend these other adjustments which I've made in the attached PBIX:
1. Added columns Offset Min and Offset Max to Lender Start Date Slicer:
2. Rewrote Lender Period Count to make use of these columns:
Lender Period Count = VAR SelectedDate = [Selected Date] VAR SingleFilter = HASONEFILTER ( 'Lender Start Date Slicer'[Days Since Start Date] ) VAR OffsetMin = IF ( SingleFilter, SELECTEDVALUE ( 'Lender Start Date Slicer'[Offset Min] ), -365 ) VAR OffsetMax = IF ( SingleFilter, SELECTEDVALUE ( 'Lender Start Date Slicer'[Offset Max] ), 0 ) RETURN CALCULATE ( COUNT ( 'Lender Details'[LenderEmpNoText] ), KEEPFILTERS ( 'Lender Details'[Lender Role Start Date] >= SelectedDate + OffsetMin && 'Lender Details'[Lender Role Start Date] <= SelectedDate + OffsetMax ) ) + 0The measure will apply a filter according to the single date range selected. If there are multiple or no selections made, the default offset is [-365,0].
3. I also added a visual-level filter to the table visual: Lender Period Count ≠ 0.
This seems to work as intended. Is this what you're looking for?
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.