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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ArashZ
Helper I
Helper I

Count of rows for repetitive columns

Hi,

 

In this picture, we have user, event type and date fields. I want to count the number of unique rows for a user that event type = upgrade. For example, User A's event type equals upgrade on three different dates, or the same dates. (Dates can be equal or different). When counting I want to see just one row for that user since the date is not important for me. As a result, in the picture, the count should be 3 for user A, B and C.

 

Event typeUserDate
UpgradeA06/05/2021
UpgradeA06/05/2021
UpgradeA06/05/2021
UpgradeB10/05/2021
UpgradeB10/05/2021
UpgradeB10/05/2021
UpgradeB10/05/2021
UpgradeC07/05/2028
UpgradeC07/05/2021

 

The desired picture is like this, and the count should be 3:

Event typeUser
UpgradeA
UpgradeB
UpgradeC

Best,

2 REPLIES 2
HashamNiaz
Solution Sage
Solution Sage

Hi @ArashZ !

You can also use following DAX to creae a measure which will give you Disinct user count;

 

DistinctCount = CALCULATE(DISTINCTCOUNT(EventUser[User]), FILTER(EventUser, EventUser[Event type] = "Upgrade"))

 

Regards,

Hasham

HashamNiaz
Solution Sage
Solution Sage

Hi @ArashZ !

You can create a new table use following DAX to get distinct user value;

DistinctEventUser = SUMMARIZE(EventUser, EventUser[Event type], EventUser[User])

 

This will give you unique user with event type. Later you can filter the visual based on Event Type = "Upgrade"

 

Regards,

Hasham

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.