
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create Bar Chart
Dear Experts,
I need to create a Bar Chart using the below sample data:
Working Day | TxnDate | Time Hour | Sales |
22-Sep-23 | 22-Sep-23 | 4 | 1000 |
22-Sep-23 | 22-Sep-23 | 5 | 2000 |
22-Sep-23 | 22-Sep-23 | 6 | 1562 |
22-Sep-23 | 22-Sep-23 | 7 | 6452 |
22-Sep-23 | 22-Sep-23 | 8 | 3245 |
22-Sep-23 | 22-Sep-23 | 9 | 1334 |
22-Sep-23 | 22-Sep-23 | 10 | 1324 |
22-Sep-23 | 22-Sep-23 | 11 | 2435 |
22-Sep-23 | 22-Sep-23 | 12 | 1324 |
22-Sep-23 | 22-Sep-23 | 13 | 748 |
22-Sep-23 | 22-Sep-23 | 14 | 1010 |
22-Sep-23 | 22-Sep-23 | 15 | 2000 |
22-Sep-23 | 22-Sep-23 | 16 | 1012 |
22-Sep-23 | 22-Sep-23 | 17 | 1013 |
22-Sep-23 | 22-Sep-23 | 18 | 1014 |
22-Sep-23 | 22-Sep-23 | 19 | 1015 |
22-Sep-23 | 22-Sep-23 | 20 | 1016 |
22-Sep-23 | 22-Sep-23 | 21 | 3000 |
22-Sep-23 | 22-Sep-23 | 22 | 1018 |
22-Sep-23 | 22-Sep-23 | 23 | 2572 |
22-Sep-23 | 22-Sep-23 | 24 | 1020 |
22-Sep-23 | 23-Sep-23 | 0 | 1021 |
22-Sep-23 | 23-Sep-23 | 1 | 1022 |
22-Sep-23 | 23-Sep-23 | 2 | 1023 |
The problem i am getting is in sorting because the start of the bar chart should be Time hour 4 and end should be 2 because working day starts from 4 AM and ends at 2 AM Next day. How to sort based on Working day and TxnDate(Normal date)
- Subscribe by Topic:
-
Chart
-
Data Load Editor
-
dimension
-
expression
-
General Question
-
Script
-
Set Analysis
-
Visualization

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
load the data and create below filed
Timestamp(Date(TxnDate, 'DD-MMM-YY') & ' ' & [Time Hour], 'YYYY-MM-DD hh') as Timestamp
then create a bar chart with new timestamp as dimension and measure as sales. and sort accordingly

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chanty4u,
I don't think that this was the intention of the question because with that solution, the questioner get wrong results when he add a date picker, because the sales of 23-Sep-23 2 AM are sales which should count to 22-Sep-23.
I would solve this in 2 steps:
1) create a 'master calendar' with dates of Working Day as 'MasterDate' (key)
2) create a new field as combination TxnDate & TimeHour and substract the offset of 4h as 'MasterDate' (key)
Now you can select your MasterDate in your visualizations and get the correct sales.
