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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Heursqem
Frequent Visitor

Monthly occurencies, grouped by occurence

Hi

 

I have the following table [UserActivity]:

Heursqem_0-1625400159887.png

 

I am looking to create the following report:

Heursqem_1-1625400404722.png

 

Anywhone who can point me into the right direction?

 

Thanks in adavcne

Heursqem

1 ACCEPTED SOLUTION

Hi @Heursqem ,

 

Try the following measures:

 

Number of Users with 0 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 0) )
Number of Users with 1 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 1) )
Number of Users with 2 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 2) )
Number of Users with 3 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 3) )
Number of Users with 4 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 4) )
Number of Users with 5+ LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] >= 5) )

image.png

 


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

3 REPLIES 3
Fowmy
Super User
Super User

@Heursqem 

Can you share some data in text format and clarify how to find about the users who have not used the report? do you have a separate table with Users?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Good Question!

 

Tye table itself contains all users. I want to count how many users have Logged in 0, once, twice etc per month.

Before users can login theu will have an entry in the same table, but with ActivityType "CREATED". So, all users will have at least 1 record in the table itself. And they will have a CREATED record before they are able to have a LOGIN record

 

Does that answer your question @Fowmy ?

Hi @Heursqem ,

 

Try the following measures:

 

Number of Users with 0 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 0) )
Number of Users with 1 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 1) )
Number of Users with 2 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 2) )
Number of Users with 3 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 3) )
Number of Users with 4 LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] = 4) )
Number of Users with 5+ LOGINs = 
var tab = 
    SUMMARIZE(
        UserActivity, 
        UserActivity[UserGuID], 
        "_count", CALCULATE( COUNT(UserActivity[UserGuID]), UserActivity[ActivityType] = "LOGIN" )
    )
return COUNTROWS( FILTER(tab, [_count] >= 5) )

image.png

 


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

 

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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