Forum Discussion
Krzysztof_Hyla
Helper II
6 years agoCalculated column condition with date from slicer
Goal: I want to add a calculated column to my table (if statement) based on the date slicer selection. This will then allow me to filter the table and show only the positions that were active on a ...
- 6 years ago
Create the below measure.
Show Row in report? = VAR SelectedDate = MAX ( 'Calendar'[Date] ) RETURN IF ( AND ( SELECTEDVALUE ( 'Positions'[Start] ) <= SelectedDate, OR ( SELECTEDVALUE ( 'Positions'[End] ) > SelectedDate, ISBLANK ( Positions[End] ) ) ), 1, 0 )
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
nandukrishnavs
Community Champion
6 years ago
Create the below measure.
Show Row in report? =
VAR SelectedDate =
MAX ( 'Calendar'[Date] )
RETURN
IF (
AND (
SELECTEDVALUE ( 'Positions'[Start] ) <= SelectedDate,
OR (
SELECTEDVALUE ( 'Positions'[End] ) > SelectedDate,
ISBLANK ( Positions[End] )
)
),
1,
0
)
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Krzysztof_Hyla
Helper II
6 years agoThank you! This has helped me a lot.
I've looked around and I understand now that I cannot directly control column calculation based on slicer value