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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Problem calculating the total sum of users

Hi all,

 

I'm having problem to get the real sum of users. I have the measure, which is the sum of users:

 

Users = calculate(DISTINCTCOUNT(Users[IdRegistered]); Users[IsRegistered])

Then, I want to visualize the quantity of users that visualize an event or video. Then I drag from my dimension table, the field related to the name of the event, and I get the result table:

 

Imagen.png

From this table, the total result is not working properly, as the sum of the users should be 3.977 (622 + 908 + 944 + 1503). Also, I've created a new measure but I'm not getting the expected result:

 

Users Total = CALCULATE(COUNT(Users[IdRegistered]); Users[IsRegistered])

Tabla event.png

And this is a basic model:

modelo.png

 

I am missing something? Please help, I have tried several ways to do it but I can't get it. Thanks in advance

1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

The reason you're seeing a lower result in the total row for your DISTINCTCOUNT measure is because PowerBI is re-calculating the measure, but including all Events.  So I'm guessing you had ~700 people that went to multiple events.

 

To get the 3977 sum you're looking for, try this:

TotalUsersForTable = SUMX( ADDCOLUMNS(VALUES(Table1[Evento]), "Total People", [UsersTotal]), [Total People])

View solution in original post

1 REPLY 1
Cmcmahan
Resident Rockstar
Resident Rockstar

The reason you're seeing a lower result in the total row for your DISTINCTCOUNT measure is because PowerBI is re-calculating the measure, but including all Events.  So I'm guessing you had ~700 people that went to multiple events.

 

To get the 3977 sum you're looking for, try this:

TotalUsersForTable = SUMX( ADDCOLUMNS(VALUES(Table1[Evento]), "Total People", [UsersTotal]), [Total People])

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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