Forum Discussion
Count Timestamp Values from 2 columns on same table?
Hi all!
I have tried to illustrate what I want to do using MS Excel. Say that we have 2 columns with sales timestamps of 2 products.
How can we plot the count of these timestamps in a single table using specific time buckets?
Example below:
| DATA | PRODUCT on Power BI | ||||
| Item 1 Sales Time Bucket | Item 2 Sales Time Bucket | Time Buckets | Item Sales 1 | Item Sales 2 | |
| 12:05 | 05:45 | 00:00 | 0 | 0 | |
| 15:45 | 19:14 | 01:00 | 0 | 0 | |
| 12:05 | 05:45 | 02:00 | 0 | 0 | |
| 15:45 | 19:14 | 03:00 | 0 | 0 | |
| 12:05 | 05:45 | 04:00 | 0 | 0 | |
| 15:45 | 19:14 | 05:00 | 0 | 9 | |
| 12:05 | 05:45 | 06:00 | 0 | 0 | |
| 15:45 | 19:14 | 07:00 | 0 | 0 | |
| 12:05 | 05:45 | 08:00 | 0 | 0 | |
| 15:45 | 19:14 | 09:00 | 0 | 0 | |
| 12:05 | 05:45 | 10:00 | 0 | 0 | |
| 15:45 | 19:14 | 11:00 | 0 | 0 | |
| 12:05 | 05:45 | 12:00 | 9 | 0 | |
| 15:45 | 19:14 | 13:00 | 0 | 0 | |
| 12:05 | 05:45 | 14:00 | 0 | 0 | |
| 15:45 | 19:14 | 15:00 | 9 | 0 | |
| 12:05 | 05:45 | 16:00 | 0 | 0 | |
| 15:45 | 19:14 | 17:00 | 0 | 0 | |
| 18:00 | 0 | 0 | |||
| 19:00 | 0 | 9 | |||
| 20:00 | 0 | 0 | |||
| 21:00 | 0 | 0 | |||
| 22:00 | 0 | 0 | |||
| 23:00 | 0 | 0 | |||
| 23:59 | 0 | 0 |
airportGR I created a solution in this file:
Time Bucket Count.pbix
7 Replies
- SpartaBICommunity Champion
airportGR I created a solution in this file:
Time Bucket Count.pbix- airportGRFrequent Visitor
Thank you very very much guys!
- SpartaBICommunity Champion
airportGR
my pleasure 🙂
Hey, check out my showcase report - got some high level stuff there 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up if you liked it 🙂
- ManguilibeKAOResolver I
Hi,
You have given us the input. Could you provide the output you want, given this input?
Best regards.
- airportGRFrequent Visitor
Hi ManguilibeKAO , yes.
The output is the second table, the count of the 2 different timestamp columns based on provided time buckets.
- ManguilibeKAOResolver I
Hi,
Ok, I see. In this second table, only the column Time Buckets is filled. Could you also fill the the columns Item Sales 1 and Item Sales 2?
Best regards.
- airportGRFrequent Visitor
Done ManguilibeKAO . The second table is a count of the two columns based on provided time buckets.