Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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_IDDateTrue/False
11-10-2018True
11-11-2018True
11-12-2018True
21-3-2020True
21-4-2020True
21-5-2020True
21-6-2020True
21-7-2020True
31-6-2020False
31-7-2020False
31-8-2020False
  • Perhaps:

     

    TrueFalse Column = 
      VAR __Min = MINX(FILTER('Table',[Customer_ID] = EARLIER([Customer_ID)),[Date])
    RETURN
      IF(__Min < TODAY(),TRUE(),FALSE())

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Perhaps:

     

    TrueFalse Column = 
      VAR __Min = MINX(FILTER('Table',[Customer_ID] = EARLIER([Customer_ID)),[Date])
    RETURN
      IF(__Min < TODAY(),TRUE(),FALSE())