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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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