cancel
Showing results for 
Search instead for 
Did you mean: 
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.

View solution in original post

senescence
Frequent Visitor

@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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.