Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

ACCUMULATED DAX

Hi all,

 

I'm building a Customer Report and got a problem. Hope someone can help me to solve it :(

 

I want to track Customer's Health. Here is my user table struture:

Col1: user's email

Col2: user's created date

Col3: user's company name

Col4: user's status (O is active, -1 is inactive)

 

Please kindly take a look this example

I have 01 Customer:

- Company A

- At the moment, Company A has 10 active users

- 5 users had created in Week 31

- 3 more users had created in Week 32

- 2 more users had created in Week 33

 

I want to know how many created users of company A. 

The correct result I want to see are:

W31: 5 created users

W32: 8 created users

W33: 10 created users

 

But when I'm using this below DAX

CALCULATE(DISTINCTCOUNT('Users Table'[email]),FILTER('Users Table','Users Table'[status] <> -1))

The incorrect results ares:

Week 31: 10 created user

Week 32: 10 created user

Week 33: 10 created user

 

(In the future, if the company A create 5 more users, the results will look like 

Week 31: 15 created user

Week 32: 15 created user

Week 33: 15 created user

Week 34: 15 created user)

 

Please kindly help me in this issue. Thanks in advance.

 

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Robble VL, thanks for your quick response.

       

      Please kindly take a look at these pictures in below

      When I'm not using Running total Formula, the result will look like:

       

       
      When I'm adding Running Total DAX,
      Active Members running total in Created Date =
      CALCULATE(
          [Active Members],
          FILTER(
              ALLSELECTED('base Users'[Created Date]),
              ISONORAFTER('base Users'[Created Date], MAX('base Users'[Created Date]), DESC)
          )
      )
       
      The result is
       
      As you can see, the date 7/10/2019 appeared 12 times, but I just want to see it 1 time. Like this:
      7/10/2019 12
      7/11/2019 15
      7/17/2019 16
      7/23/2019 17
      7/26/2019 18
       
      Please kindly help me :(
      • v-yuta-msft's avatar
        v-yuta-msft
        Community Support

        Anonymous ,

         

        So [Active Members] is a measure right? Could you show that measure? If possible, could you also share the sample data?

         

        Regards,

        Jimmy Tao