Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mottosson
Regular Visitor

Count new users based on usage logging

How can I create two column charts based on usage logging that shows the growth of users? I have the username and timestamp (among other metrics).

 

I want one chart to show the number of users that's never been seen before (new users), and one that shows the accumulated user count (all unique users).

 

Date, username

2019-01-01, user1

2019-01-01, user1

2019-01-24, user2  -- Two new users in Jan

2019-02-11, user1

2019-02-17, user3

2019-02-11, user2 -- Three unique, but only one new user i Feb

2019-03-05, user4 -- One new user i Mar

and so on...

 

Chart1, new users per month:
  |
  |   |   |
-----------------

  j   f   m...

 

Chart2, total unique users:

          |

      |   |

  |   |   |
  |   |   |
-----------------

  j   f   m...

 

Thanks!

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi @mottosson 

You could try this way as below:

Step1:

Add a YearMonth column for date column

Step2:

Use these two formula to create two measure for your requirement:

new users = CALCULATE(DISTINCTCOUNT('Table'[username]),FILTER('Table','Table'[Date]=CALCULATE(MIN('Table'[Date]),ALLEXCEPT('Table','Table'[username]))))
all unique users = CALCULATE(DISTINCTCOUNT('Table'[username]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))

Result:

4.JPG

and here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @mottosson 

You could try this way as below:

Step1:

Add a YearMonth column for date column

Step2:

Use these two formula to create two measure for your requirement:

new users = CALCULATE(DISTINCTCOUNT('Table'[username]),FILTER('Table','Table'[Date]=CALCULATE(MIN('Table'[Date]),ALLEXCEPT('Table','Table'[username]))))
all unique users = CALCULATE(DISTINCTCOUNT('Table'[username]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))

Result:

4.JPG

and here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much! Works perfectly.

But your measure formulas needed to be adjusted to use semicolons instead of commas to get it to work. Maybe it's some internationalization setting, but it threw me off for a minute (the attached file helped a lot!).

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.