Forum Discussion
If function (True/False) based on date slicer
- Anonymous5 years ago
Hi Krexx ,
According to my understand , you want to dynamically display True()/False() based on Slicer ,right?
Firstly , you need to create a calendar table using :
DateSlicer = CALENDAR ( "2019/1/1", "2019/12/31" )Make sure the data type of Date of birth is “Date”
Then use the following formula:
Measure = VAR _maxDate = MAX ( 'DateSlicer'[Date] ) VAR _minDate = MIN ( 'DateSlicer'[Date] ) RETURN IF ( MAX ( 'DateTable'[Date of birth] ) > _minDate && MAX ( 'DateTable'[Date of birth] ) <= _maxDate, TRUE (), FALSE () )My visualization looks like this:
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
Hi Krexx ,
According to my understand , you want to dynamically display True()/False() based on Slicer ,right?
Firstly , you need to create a calendar table using :
DateSlicer =
CALENDAR ( "2019/1/1", "2019/12/31" )Make sure the data type of Date of birth is “Date”
Then use the following formula:
Measure =
VAR _maxDate =
MAX ( 'DateSlicer'[Date] )
VAR _minDate =
MIN ( 'DateSlicer'[Date] )
RETURN
IF (
MAX ( 'DateTable'[Date of birth] ) > _minDate
&& MAX ( 'DateTable'[Date of birth] ) <= _maxDate,
TRUE (),
FALSE ()
)My visualization looks like this:
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin