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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
rpinxt
Solution Sage
Solution Sage

Count per user per day in table

This is a (very) simplified table:

UserDayCount
A12
B11
A12
D12
D12
A22
B22
C21
D21
A22
B22
C32
D32
C32
D32
A41
D41

 

I want to make a calculated column for the values here in colum 'Count'

So there are much more columns but column User and Day are the columns in scope.

 

I want to count the number of rows by user by day (which will be a date field).

Kind of making subtotals by user and day

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@rpinxt , Create a calculated column using

 

DAX
RowCount =
CALCULATE(
COUNTROWS('UserData'),
ALLEXCEPT('UserData', 'UserData'[User], 'UserData'[Day])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@rpinxt , Create a calculated column using

 

DAX
RowCount =
CALCULATE(
COUNTROWS('UserData'),
ALLEXCEPT('UserData', 'UserData'[User], 'UserData'[Day])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks @bhanu_gautam this is doing what I want, but I am a bit confused why it is working 😄

 

I do not understand the ALLEXCEPT because I would expect that you just would want these 2 fields and not the rest.

This feels like the other way around.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.