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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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