Forum Discussion

Luddekudde's avatar
Luddekudde
Advocate I
8 years ago
Solved

Column filtering

Hello, I have a problem with filtering columns. In my report I would like to count the number of tickets created based on the month and year to later create a rolling sum. What I have tried to do is ...
  • Greg_Deckler's avatar
    Greg_Deckler
    8 years ago

    Without data, can't recreate but your measure should be something like:

     

    Total Count = 
    VAR maxDate = MAX(sys_created_on)
    RETURN SUMX(FILTER(ALL(Table),[sys_created_on]<maxDate),[Ticket Created])

    Basically, get the max date in the current context (last ticket in the current month). Grab all of the entries and filter out so that you get everything less than that date and sum up the tickets.

     

    You could also use COUNTROWS instead of SUMX as Floriankx suggested.

  • Luddekudde's avatar
    Luddekudde
    8 years ago

    Greg_Deckler

     

    I understood why I got the wrong numbers, I had some essential filters on the report that got removed by the ALL function.

     

    Thanks for the help! :smileyhappy: