Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have got the below table-
ID | PR1 | PR2 | PR3 | PR4 | PR5 | PR6 | PR7 |
A001 | 01/10/2019 | 01/20/2019 | 01/25/2019 | 01/27/2019 | 01/29/2019 | 02/02/2019 | 02/04/2019 |
B002 | 01/15/2019 | 01/19/2019 | 01/25/2019 | 01/27/2019 | 02/03/2019 | 02/07/2019 | 02/07/2019 |
C003 | 01/16/2019 | 01/17/2019 | 01/26/2019 | 01/30/2018 | 02/02/2019 | 02/18/2019 | 02/20/2019 |
Now i need to create a horizontal Stacked Bar chart. I have created the Stacked Bar Chart.
But the issue is I am not getting the right format of dates in Stacked Bar chart, not sure what is the issue.
Please find the image attached to have a look at my Stacked Bar chart.
Please let me know if you have questions.
Thanks in advance!
I need Stacked Bar Chart as attached in image.
Like for each Id, i need to display the dates stacked from PR1 to PR7.
Note: if you observe the image, the date format is not in right format.
Instead sum use only function on Date fields
I tried that as well.
It dint work out well.
I am worried without looking at your app it will be hard to tell what is the issue?
What is the dimension and measure used in the chart?
Hi
When coming to stacked bar the dates are getting summed up but in the non stacked the date format are correct. attached the screen shot.
in the stacked bar chart the dates are sum up example
1/10/2019+ 1/20/2019+1/25/2019 = 2/26/2257
1/10/2019 | 1/20/2019 | 1/25/2019 |
use below expressions
=date(sum(PR1))...... for all expression
Go to chart properties -> appearance -> x-axis option -> Range -> Custom-> Min/Max
in Min: use min(PR1)
in Max: use max(PR7)
It Should not Sum up. I want to have it like that only in stacked bar.
I tried with date(sum(PR1))) and did the same expression till PR7, there is no change 😞
What are your DateFormat and TimestampFormat variables set to in your data load script? Default US formatting is the following:
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
That's what your data appears to be in, but if it's not you can either change your default date format or ensure the values are brought in as dates and then specify the format of the date thusly:
LOAD ID, DATE(DATE#(PR1,'M/D/YYYY'),'YourFormatString') as PR1;
SQL SELECT ID, PR1
FROM Table;
You may also want to floor your date if you are dealing with timestamps in the import (and want to group by date).
DATE(FLOOR(DATE#(PR1,'M/D/YYYY')),'YourFormatString') as PR1;
I am using US Date format and there is no time stamp in my data.
I did not understand this part -
SQL SELECT ID, PR1
FROM Table;
Not sure how to scrip this!
Also in the below script , what do you mean by 'YourFormatString'
DATE(FLOOR(DATE#(PR1,'M/D/YYYY')),'YourFormatString') as PR1;
Thanks in advance!