Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone, I am a new Power BI user. I have a requirement. Please suggest to me how to let a measure work.
Date | Time | Username | Transaction |
01.07.2019 | 9:53:07 | A | Payment |
01.07.2019 | 9:53:07 | A | Payment |
02.07.2019 | 10:25:28 | A | Payment |
02.07.2019 | 10:25:46 | A | PURCHASE |
02.07.2019 | 15:46:52 | A | PURCHASE |
03.07.2019 | 10:51:01 | B | PURCHASE |
03.07.2019 | 10:51:01 | B | PURCHASE |
03.07.2019 | 10:51:01 | B | PURCHASE |
03.07.2019 | 11:01:01 | B | Payment |
I have one set of data like this table. What I want to do is to count the transaction that each people access but when I export the data from the system something that I don't want to use is also export too.
I want the measure that shows the result like this.
Username | Transaction | Time |
A | Payment | 2 |
A | PURCHASE | 2 |
B | Payment | 1 |
B | Payment | 1 |
The same data count only 1 time. In my sample, user A accesses Payment transaction 2 times at 9:53:07 so count just 1.
Please suggest the measure or something that I have to do. Thank you.
Solved! Go to Solution.
You should be able to do this by creating a measure that uses the DISTINCTCOUNT function on the time column.
eg.
= DISTINCTCOUNT( Table[Time] )
You may add the measure below.
Measure = COUNTROWS ( SUMMARIZE ( 'Table', 'Table'[Date], 'Table'[Time] ) )
You should be able to do this by creating a measure that uses the DISTINCTCOUNT function on the time column.
eg.
= DISTINCTCOUNT( Table[Time] )
User | Count |
---|---|
59 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
80 | |
62 | |
45 | |
40 | |
39 |