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
senescence
Frequent Visitor

Aggregates of counts over time

This is probably really easy but I can't work it out.

 

I have a table with a user id and a log in time.

 

I want to show the count of users who have logged in x number of times.

 

So I'd have 1,2,3 etc on the x axis and the count of users on the y axis.

 

Any help appreciated - thanks.

1 ACCEPTED SOLUTION
Omega
Impactful Individual
Impactful Individual

@senescence

 

Try create a new Table = GROUPBY(Table1,Table1[User ID],"Count of login",COUNTX(CURRENTGROUP(),Table1[Login time]))

 

User ID by default will be summarized as count. 

 

Hope this helps.

View solution in original post

7 REPLIES 7
Omega
Impactful Individual
Impactful Individual

@senescence

 

Try create a new Table = GROUPBY(Table1,Table1[User ID],"Count of login",COUNTX(CURRENTGROUP(),Table1[Login time]))

 

User ID by default will be summarized as count. 

 

Hope this helps.

@Omega

 

This works perfectly - thanks!

Anonymous
Not applicable

Hi @senescence,

 

Sorry I misunderstood  the question earlier, anyway the solution that @v-chuncz-msft provided should work I think

.

 

Regards,

L.Meijdam

Anonymous
Not applicable

Hi @senescence,

 

I recreated your problem, and the pictures below show how to get the visualisation you want.

 

(used a column chart)

(User ID are numbers in my example 1-7)

dada.PNG

Hope this was what you wanted to know.

 

let me know if you have questions !

 

Regards,

L.Meijdam

 

Hi @Anonymous

 

Thanks - but this isn't quite what I want. I don't want to see individual user ids. I want to see the count of userids over the count of logintimes.

 

So. If I have the following:

 

User - Login Time

1 - 10.00 

2 - 11.00

3 - 12.00

4 - 13.00

5 - 14.00

6 - 15.00

1 - 16.00

2 - 17.00

3 - 18.00

1 - 19.00

2 - 20.00

1 - 19.00

 

The graph would show the count of logins in the x axis (1,2,3,4) and the count of users who have logged in that many times on the y axis (3,1,1,1).

 

 

 

@senescence,

 

You may follow the steps below.

1) add a calculated table

Table2 =
GENERATESERIES ( 1, 4, 1 )

2) add a measure

Measure =
COUNTROWS (
    FILTER (
        SUMMARIZE ( Table1, Table1[User], "Count", COUNTROWS ( Table1 ) ),
        [Count] = MAX ( Table2[Value] )
    )
)

 

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

hi @v-chuncz-msft,

 

Small question: If the count of logging changes, let's say a user have logged in 20 time, does that mean Generateseries() formula needs to be updated?

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.