Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to do a gant-like chart.
My data are like this :
PROJECT | PROJECT_TYPE | START_DATE_TYPE_1 | END_DATE_TYPE_1 | START_DATE_TYPE_2 | END_DATE_TYPE_2 |
---|---|---|---|---|---|
A | 1 | 01/01/2012 | 01/02/2012 | ||
A | 2 | 01/03/2012 | 01/04/2012 | ||
B | 1 | 01/03/2012 | 15/05/2012 | ||
B | 2 | 18/02/2012 | 10/03/2012 | ||
If I try to do a bar chart :
dimension PROJET&PROJECT_TYPE
expression sum( if( PROJECT_TYPE = 1, END_DATE_TYPE_1 - START_DATE_TYPE_1 ))
with an offset sum( if( PROJECT_TYPE = 1, START_DATE_TYPE_1 ))
unchecking forced0
IT IS OK
Idem if I do the same for TYPE2
BUT if I have 2 expressions (one for type 2 and one for type 1) then the min value of the scale is 01/01/1900 and max value is 01/01/2020
Does someone know why ?
Thanks a lot
I attach a doc.
You didn't format your dates so 01/01/2012 is interpreted as 1 divided by 1 divided by 2012. And thats a very small number. When that small number is interpreted as a date you end up near the start of the calendar, i.e. in 1900. See attached qvw.
You didn't format your dates so 01/01/2012 is interpreted as 1 divided by 1 divided by 2012. And thats a very small number. When that small number is interpreted as a date you end up near the start of the calendar, i.e. in 1900. See attached qvw.
Thank you very much Gysbert !!
How do you explain that each one of my expression is correctly interpreted, but when both are activated it doen"t work ?
Any idea ?
Because even if you example work, i'm stuck with my real data
OK
I see that in addition to force the date format, you also defined a static min.
If i remove that static min, your chart has the same problem as mine : the scale is OK with 1 expression, and is screwed with 2.
So I guess it is a QV bug.