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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.