Forum Discussion

DirkPuylaert's avatar
DirkPuylaert
New Member
7 years ago
Solved

running total active Customers

Hello,   I'm trying to create a visual where I can see the total of Active sites based upon the selected date. I have the following example table.   I don't just need a total, but a count of cus...
  • v-jiascu-msft's avatar
    7 years ago

    Hi DirkPuylaert,

     

    Please check out the demo in the attachment. 

    1. Create a date table if you don't have one.

    2. DO NOT establish any relationship. 

    3. Create a measure.

     

    Measure =
    CALCULATE (
        COUNT ( Table1[customerID] ),
        FILTER (
            'Table1',
            'Table1'[siteActiveDate] <= SELECTEDVALUE ( 'Calendar'[Date] )
                && IF (
                    ISBLANK ( 'Table1'[siteInactiveDate] ),
                    DATE ( 9999, 12, 31 ),
                    'Table1'[siteInactiveDate]
                )
                    >= SELECTEDVALUE ( 'Calendar'[Date] )
        )
    )
    

     

    running_total_active_Customers

     

    Best Regards,
    Dale

  • v-jiascu-msft's avatar
    v-jiascu-msft
    7 years ago

    Hi Dirk,

     

    Please refer to the snapshot below.

    running-total-active-Customers2

     

    Best Regards,
    Dale