Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
LP27
Creator II
Creator II

Stacked Bar chart with dates

Hi Everyone,

I have got the below table-

IDPR1PR2PR3PR4PR5PR6PR7
A00101/10/201901/20/201901/25/201901/27/201901/29/201902/02/201902/04/2019
B00201/15/201901/19/201901/25/201901/27/201902/03/201902/07/201902/07/2019
C00301/16/201901/17/201901/26/201901/30/201802/02/201902/18/201902/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! 

Labels (4)
28 Replies
andoryuu
Creator III
Creator III

If you share your data load editor script I can mock it up using what you have.

LP27
Creator II
Creator II
Author

Alright! 

Here is my Load Script 

Stacked:
Load

RPM,
"Forecast PR1",
"Forecast PR2",
"Forecast PR3",
"Forecast PR4",
"Forecast PR5",
"Forecast PR6",
"Forecast PR7"

From ‹File Name›

andoryuu
Creator III
Creator III

What kind of file are you loading?  TXT?  CSV?  What is the encoding?  Can you provide a screenshot of a sample of the file as viewed in notepad so that the base formatting is clear?  

LP27
Creator II
Creator II
Author

I am loading xlsx file.

Here is the sample -

FROM [lib://AttachedFiles/Projects (1).xlsx]
(ooxml, embedded labels, table is Project)

andoryuu
Creator III
Creator III

Excel files can carry a lot of formatting crap along with them.  Try saving it as a CSV and importing the data.  When you open up the data model viewer do those fields get tagged as dates?  I understand you can't provide sensitive information, but providing redacted xlsx and qvf files would be the fastest way to a solution here.

LP27
Creator II
Creator II
Author

That is my App and data as well.

Note: The Dates on the Stacked Bar chart are getting added, if you see the labels.

Hopefully this helps you.

andoryuu
Creator III
Creator III

So your source data has hyphens in blank fields?

LP27
Creator II
Creator II
Author

Yes it does have dashes or hyphens for empty values.
andoryuu
Creator III
Creator III

Here's the issue - your chart has RPM as a dimension so that's how it's dividing up the series.  If you do bars side by side you see the correct dates.  When you switch to stacked its adding the dates together to get a stack.  When you think about it, this is the logical handling of this data for a stack as a continuous data type.  Your goal is to have them overlaid on top of each other, but the stack doesn't do that.  If we were working with integers and PR1 was 1, PR2 was 2, etc. you'd have a stack that was 28 tall (7+6+5+4+3+2+1) but your goal is to have one that is 7 tall and just say the max date.  Unfortunately, stacked simply doesn't work this way.  

To make this a bit more clear you'll see in the screenshot below that the top value of each series of RPM is the date#() value of each PR# added together.  That's why the dates are so high.  It's the equivalent of adding 5/1/2019 + 5/2/2019 = 43466 + 43467 = 86933 = date(86933,'m/d/yyyy') = 10/4/2138.

Dates.jpg