Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Combine filters, Filter exception,

Hi all,

 

I want to show all tasks from a sellected month and the Delayed tasks from previous months.

Thanks!

 

MonthStatusTask
JanuaryDelayA
JanuaryOn trackB
JanuaryDoneC
MarchDelayD
MarchDoneE
MarchOn trackF
  • You should be able to do this:

     

    Count Measure = 
      VAR __Table = 
        ADDCOLUMNS(
          'Table',
          "__Selected",[Selected]
        )
    RETURN
      COUNTROWS(FILTER(__Table,[__Selected] = 1))

8 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    You will need a month number column and then you could do this:

     

    Selected = 
      SWITCH(TRUE(),
        MAX('Table'[MonthNo]) = SELECTEDVALUE([MonthNo]),1,
        MAX('Table'[MonthNo]) < SELECTEDVALUE([MonthNo]) && [Status]="Delay",1,
        0
      )
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Greg_Deckler,

       

      Thanks for the reply!

      It's not working here, is this correct? 

      && [Status]="Delay"

       

      Regards,

      Lucas

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion
        Oh, if you are using this in a measure, you need to wrap that with an aggregation like && MAX([Status]="Delay"