Forum Discussion

Ankit_1987's avatar
Ankit_1987
Icon for Helper I rankHelper I
8 years ago

total users daily count by user Ids

Hi, 

So this is my column

 

UserIds                                        Date            More Columns

xjhbdckjbfdjhbad

DSKbakdhvbakjdsb

JDcjhvbakjsdb

 

I have new users coming in daily...How do I count distinct users each day and make a column for running/ cumulative total.

 

something like- 

if total users on 1st 2nd 3rd 4th and 5th dates were 5, 10 , 15, 20, 25

then the column should say 

Dates             Total Users

1st                  5

2nd                 15

3rd                  30

4th                  50

so on

 

The problem is the user id are text data type so have not been able to count and apply calculate formula to it.

Thanks

 

3 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi Ankit_1987,

     

    From your description, I try to reproduce the scenario as yours. If you want to make a column for running/ cumulative total, you could create the measure like this:

    total User = COUNTAX(FILTER(ALLSELECTED(User),User[Date]<=MAX(User[Date])),User[UserId])

     

    This visual you could refer to:

     

     

    For the details, you could refer to my test pbix file here.

     

    Hope it can help you!

     

    Best Regards,

    Cherry  

    • Ankit_1987's avatar
      Ankit_1987
      Icon for Helper I rankHelper I

      Hi Cherry,

      Thanks for the revert, I thought it helped. bUt here what I got...

       

      I replicated what you did- These are two column in question..the list is long...

       

      after adding the column you mentioned--

      I got this--

       

      Not what I was expecting...

      Also I noticed in your pbix file calculated column are shown as measure(like a calculator)..mine shows something else

      • v-piga-msft's avatar
        v-piga-msft
        Icon for Resident Rockstar rankResident Rockstar

        Hi Ankit_1987,

         

        From your description, you may have a misunderstand of measure and calculated column. In this case, you should create a measure not a calculated column.

         

        You could refer to the steps of creating a measure:

         

        1. Click Modeling ——New Measure

         

            

        2.  Type in the dax function:

         

         

            3.   You could rename the measure as you want.

         

        If it still doesn’t work, could you share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

         

        Best Regards,

        Cherry