Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Removing Data from Rows Using Subtraction

Hello All,   I am a newish user and I have been trying to figure this out for a couple days, so I would appreciate all the help I can get.   Sorting by Date (Oldest to Newest), I would like to re...
  • HotChilli's avatar
    7 years ago

    In DAX you could add a calculated column to COUNT per category e.g.

    Column = VAR _Item = Hotel[Item]
             VAR _Day = Hotel[Date]
    RETURN  
     CALCULATE(COUNT(Hotel[Item]), FILTER(Hotel, Hotel[Date] <= _Day && Hotel[Item] = _Item ))

    And then create a new table by filtering (where Column > x )

     

    NewTable = FILTER(Hotel, Hotel[Column] > 4)