Forum Discussion

TerezaPokorna's avatar
TerezaPokorna
Frequent Visitor
3 years ago
Solved

One column - duplicates and unique values in months

Hello, I desperately need your help. I have very simple data set that contains of just two columns, date and ID where ID represents a person. Date ID 1.1.2022 10101 1.1.2022 10102 1.1...
  • Greg_Deckler's avatar
    Greg_Deckler
    3 years ago

    TerezaPokorna Ah, duh. Yeah, I should have figured that out, then Net Change is:

    Net Change = 
        VAR __CurrentMonth = DISTINCT('Table'[ID])
        VAR __LastMonth = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Table'),[MonthSort] = MAX([MonthSort]) - 1),"ID",[ID]))
    RETURN
        COUNTROWS(__LastMonth) - [Left] + [New]