Forum Discussion

Vamshi2020's avatar
Vamshi2020
Helper II
5 years ago
Solved

Cumulative Distinct count based on months

Hi Everyone ,   I have a Requirement to show Cumulative count based on "Month -Year" in Line chart . Based on selections in Dim Date slicer, my value should change . My Actual count formula is : C...
  • Icey's avatar
    5 years ago

    Hi Vamshi2020 ,

     

    Try this:

    Cumulative Count =
    VAR a =
        MINX ( ALLSELECTED ( DimDate ), DimDate[Date] )
    VAR b =
        MAXX ( DimDate, DimDate[Date] )
    VAR c =
        CALCULATE (
            DISTINCTCOUNT ( MemberTable[MemberId] ),
            FILTER ( MemberTable, MemberTable[StartDate] <= b && MemberTable[EndDate] >= a )
        )
    RETURN
        c
    

     

     

    Best regards

    Icey

     

    If this post helps, then consider Accepting it as the solution to help other members find it faster.