Forum Discussion
cjgreene
2 years agoRegular Visitor
Create a dynamic column/measure/parameter based on date slicer
I have a dataset that stores information about cases and when they completed assessments: case_id assessment_ended 1 1/1/23 1 1/4/23 1 1/6/23 Using a column, measure, or...
- Anonymous2 years ago
Hi cjgreene
My Date table sample:
You can create a measure as follows.
Indicator = IF ( SELECTEDVALUE ( 'Table'[assessment_ended] ) > MIN ( 'Date'[Date] ) && SELECTEDVALUE ( 'Table'[assessment_ended] ) = MAX ( 'Date'[Date] ) - 1, 1, 0 )Is this the result you expect?
Best Regards,
Community Support Team _YuliaxIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlexisOlson
Super User
2 years agoYou can create an indicator measure that would work in a matrix or table visual, but you cannot have the actual data table in your model be responsive to slicers or filters (since they are not recalculated dynamically in response to report settings, only for data refreshes or other model updates).
Such a measure might look something like this:
Indicator =
VAR _Ended = SELECTEDVALUE ( Table1[assesment_ended] )
VAR _SelectedDates = VALUES ( DateSlicer[Date] )
RETURN
IF ( _Ended IN _SelectedDates, 1, 0 )