Forum Discussion

rogerthat's avatar
rogerthat
Icon for Helper I rankHelper I
3 years ago
Solved

EARLIER Function too Slow!

Hi,   I currently have the below calculated column and I suspect the EARLIER function is taking most of the memory when I try to refresh. ObjectIndex = CALCULATE (     COUNT ( DATA[ID ),     ...
  • Greg_Deckler's avatar
    3 years ago

    rogerthat You could try this:

    ObjectIndex =
    VAR __Date = MAX(DATA[Date])
    VAR __Return = 
    CALCULATE (
        COUNT ( DATA[ID ),
        ALLEXCEPT ( DATA, DATA[ID )),
        DATA[Date )<= __Date ) )
    )
    RETURN
      __Return