Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 type | User | Date |
Upgrade | A | 06/05/2021 |
Upgrade | A | 06/05/2021 |
Upgrade | A | 06/05/2021 |
Upgrade | B | 10/05/2021 |
Upgrade | B | 10/05/2021 |
Upgrade | B | 10/05/2021 |
Upgrade | B | 10/05/2021 |
Upgrade | C | 07/05/2028 |
Upgrade | C | 07/05/2021 |
The desired picture is like this, and the count should be 3:
Event type | User |
Upgrade | A |
Upgrade | B |
Upgrade | C |
Best,
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
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
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |