Forum Discussion
Anonymous
6 years agoNot applicable
Filter on date column
Hi everyone,
Can anyone help me to create a filter on months who have passed (True) and months ahead of us (False), with one distinction: if the month starts in the past, and continue to months ahead of us, than these months should also be labelled with 'True'. Here is a small sample set to make it more clear:
So, how can I create the third column myself in Power BI?
Thank you in advance.
| Customer_ID | Date | True/False |
| 1 | 1-10-2018 | True |
| 1 | 1-11-2018 | True |
| 1 | 1-12-2018 | True |
| 2 | 1-3-2020 | True |
| 2 | 1-4-2020 | True |
| 2 | 1-5-2020 | True |
| 2 | 1-6-2020 | True |
| 2 | 1-7-2020 | True |
| 3 | 1-6-2020 | False |
| 3 | 1-7-2020 | False |
| 3 | 1-8-2020 | False |
Perhaps:
TrueFalse Column = VAR __Min = MINX(FILTER('Table',[Customer_ID] = EARLIER([Customer_ID)),[Date]) RETURN IF(__Min < TODAY(),TRUE(),FALSE())
1 Reply
- Greg_DecklerCommunity Champion
Perhaps:
TrueFalse Column = VAR __Min = MINX(FILTER('Table',[Customer_ID] = EARLIER([Customer_ID)),[Date]) RETURN IF(__Min < TODAY(),TRUE(),FALSE())