The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |