Forum Discussion
Date comparison shows wrong results
I am trying to compare two dates like below. however it is not giving me correct results.
06/30/2014 09/30/2022 YES
12 Replies
- bolfri
Solution Sage
You can't put a measure into column like this. This won't work.
If you are using [Selected Day] = SELECTEDVALUE(sometable[somedatecolumn]) then in table it suppose to return BLANK() and every null is lower than any date.- AnonymousNot applicable
bolfri I am using [Selected Day] = CALCULATE(MIN(calendar[date_column]), ALLSELECTED('calendar')) and this gives me correct values not Blank.
so I am getting below results. so looks like SELECT DAY is fetching right values through out the rows for slicer value but the if statement is not working.
LAST DAY SELECTED DAY COLUMN
06/30/2014 09/30/2022 YES07/31/2014 09/30/2022 YES
- bolfri
Solution Sage
You said that SELECTED DAY is coming from the slicer.
Are you putting column in data table or table in viz?
Column = 'Sample'[LAST DAY] > 'Sample'[SELECTED DAY]