Get a quarter out of data for a column chart

Who can help me with this challenge?
I want to create a column chart with four quarters in the current year and one column with the rest later in time.
One project can have multiple output data. They are separated by an ;
The notation of the outputdata can be a date (d-m-yyyy), a month (mm-yyyy) or a quarter (Q1-yyyy).
This is by example the available data.
Project              outputdata
Project 1           1-4-2014
Project 2           03-2014;Q4-2014;Q2-2015
Project 3           25-09-2014;Q1-2015
The data I want to get for the column chart is:
Project              outputdata                    columnchart
Project 1           1-4-2014                       Q2-2014
Project 2           03-2014                        Q1-2014
Project 2           Q4-2014                       Q4-2014
Project 2           Q2-2015                       2015 and later
Project 3           25-09-2014                   Q3-2014
Project 3           Q1-2015                       2015 and later
I hope that someone can help me in the right direction.
Thanks in advance,
Els

Adding to what Frank has already suggested, try something on these lines:
Something like this?
SQL> ed
Wrote file afiedt.buf
  1  with x2 as(
  2     select 'proj1' proj, '1-4-2014' op, NULL chart from dual UNION ALL
  3     select 'proj2' proj, '03-2014' op, NULL chart from dual UNION ALL
  4     select 'proj2' proj, 'Q4-2014' op, NULL chart from dual UNION ALL
  5     select 'proj2' proj, 'Q2-2015' op, NULL chart from dual UNION ALL
  6     select 'proj3' proj, '25-09-2014' op, NULL chart from dual UNION ALL
  7     select 'proj3' proj, 'Q1-2015' op, NULL chart from dual
  8  )
  9  select
10     proj,
11     op,
12     case
13     when regexp_like(op,'((\d{1}|\d{2})-(\d{1}|\d{2})-(\d{4}))')
14     then
15             'Q'||TO_CHAR(TO_DATE(op,'dd-mm-yyyy'),'Q')||'-'||TO_CHAR(TO_DATE(op,'dd-mm-yyyy'),'yyyy')
16     when regexp_like(op, 'Q\d{1}-\d{4}')
17     then
18             CASE
19             when SUBSTR(op,-4,4) > 2014
20             then
21                     SUBSTR(op,-4,4)||' and later'
22             else
23                     op
24             end
25     when regexp_like(op, '\d{2}-\d{4}')
26     then
27             'Q'||TO_CHAR(TO_DATE(op,'mm-yyyy'),'Q')||'-'||TO_CHAR(TO_DATE(op,'mm-yyyy'),'yyyy')
28     end
29* from x2
SQL> /
PROJ       OP                   CASEWHENREGEXP
proj1      1-4-2014             Q2-2014
proj2      03-2014              Q1-2014
proj2      Q4-2014              Q4-2014
proj2      Q2-2015              2015 and later
proj3      25-09-2014           Q3-2014
proj3      Q1-2015              2015 and later
6 rows selected.

Similar Messages

  • Decimal Point data for Stacked Column Chart

    Hi,
    I use a basic version of a Column chart for one of my projects. I use a stacked column chart with 2 data series namely "Expenses" & "Profit".
    I use decimal point numbers (with only two or three places after the decimal point) for both series.
    When I mouse over the bars of the output for tool tip, I view more numbers after the decimal point for some data.
    How to fix the decimal point to only 2 places & what is the reason for this behaviour?
    Attached is the sample output (output.gif) showing the above condition for the mentioned data.
    -Sen

    Create an toolTipShow event handler and use a NumberFormatter to set the precision of the numbers (sample code from LiveDocs):
    <?xml version="1.0"?>
    <!-- formatters\MainNumberFormatter.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
            <![CDATA[
                // Define variable to hold the number.       
                [Bindable]
                private var bigNumber:Number = 6000000000.65;
            ]]>
        </mx:Script>
        <!-- Declare and define parameters for the NumberFormatter.-->
        <mx:NumberFormatter id="PrepForDisplay"
            precision="0"
            rounding="up"
            decimalSeparatorTo="."
            thousandsSeparatorTo=","
            useThousandsSeparator="true"
            useNegativeSign="true"/>
        <!-- Trigger the formatter while populating a string with data.-->
        <mx:TextInput text="{PrepForDisplay.format(bigNumber)}"/> 
    </mx:Application>

  • I bought the Garmin USA app for $50.. it is useless as out of date for my area. The apple store said go to Garmin. Garmin said fgo to the app store.. I clicked not satisfied on my receipt and it sent me to Garmin!!! They said it was apple to deal with

    I bought the Garmin app for $50 as the maps on my garmin in my car are not current. I thought this would avoid the need to travel with 2 devices. However, the maps are hopelessly out of date for where I live with roads and roundabouts that have been there for more than a year not on the maps. I went to the apple store to ask them what to do. they said contact Garmin. I did and they said it was only apple who could give me the refund. So I found the receipt and clicked on "do you have a problem with this app" and was redirected to Garmin. I called them( I was on hold a long time) and they said I would need to get the refund from apple.... but I can't find a way to do this. If the app had been 99 cents that would have been OK.. I've bought a few duds , but $49.99!!!
    How can I get to contact apple store/ App store directly to get the refund.. this has been going on for weeks with me getting the run around from Garmin and apple. PS don't buy this app!!!!

    Garmin is sending you to Apple because it is Apple that would have to give you a refund as the actual point of sale.  However, Apple states all sales are final.
    Apple is sending you to Garmin because it is Garmin's fault their maps are out of date and Apple doesn't write the software.  They may not even be looking that deeply and simply perceiving it as a programming "bug" it is up to Garmin to solve.
    Who know whose fault it is that Garmin isn't getting up to date data to put in their maps.
    Ultimately I think you stand the best chance in getting a refund from Apple though it isn't guaranteed.  Apple is the cashier.  You just have to convince them this isn't just a line of code omitted from an application and isn't something that will be soon corrected by Garmin.  Make it clear it isn't a problem with the application running on your device, it is a problem with the data it contains.  Either that or you have to hope Garmin will feel so bad about it they will delve down into their slush fund and send you a refund.

  • How to zero out my data for chart

    I am very new to LabVIEW so please be patient.
    I am aquiring 12 channels of 0-10 volt signals through a cDAQ-9174 chassis and 9205 module on Labview 11. I am using producer/consumer loops to the write the data to a file also sent to two charts. I want to keep the data sent to the file as is, and then tare (zero out) the data going to the charts.
    I have attached the code. Please ignore the diagram dissable structure and it's contents.
    Any help would be appreciated,
    ~Chris
    Attachments:
    WaveTest_2.8.vi ‏258 KB

    Are you supposed to get the this offset each time you press Start, or only the first time? For example, if I press "Start Test A", run it for 5 minutes, and then press it again to stop it, and then 10 minutes later I press it again to start it, do you need to update the offsets, or would you use the ones from 15 minutes earlier? Since the producer consumer loops are running all the time, I would suggest using a shift register/feedback node to keep track of whether you've acquired the offset values. Reset the flag when you turn off the test if you want to get the offsets "fresh" on the next start. As for where to save this, a simple local variable will work (yes, I said local variable, all you local variable haters out there!). In this case you will not run into a race condition.
    Note: you do not need to use your own buttons for controlling the visibility of plots. In LabVIEW 2011 that's built-in. Show the plot legend, and then right-click on the legend and select Visible Items -> Plot Visibility Checkbox.
    See attached modification for one possible implementation. Note that I removed the enqueing done in the False case in the producer loop since I did not see much point in enqueuing when you didn't actually get any data.
    Attachments:
    WaveTest_2.8 MOD.vi ‏215 KB

  • Getting the lowest and highest dates from a column

    <Praise>Numbers is absolutely incredible. Kudos to the Apple team. From the first time I've used it, it has enabled this average spreadsheet user to create awe-inspiring layouts from average data. I'm extremely excited to see where Apple brings </Praise>
    What I am trying to do though is this. I have a column with dates in it. I'm trying to get the lowest and highest dates in that column for a report. For instance, "Date range between 7/1/2007 and 9/11/2007".
    Any help would be very much appreciated

    Let me also pose this. I've been asked to create a two date ranges for this from the same data. This report will need to be updated every two months. Is there a way to specify the spreadsheet to select only rows with a date between X and Y for processing?
    Or, more likely, is there a way to access a cell name by reference from another field? Such that I have a "Current From", "Current To", "Historic From", and "Historic To" column. The value of these fields could be references to a row number that has the beginning and ending date, so that it selects all of the rows in between.
    So I would have something like SUM(SourceSheet :: SourceTable :: A{CurrentTable :: A2} : SourceSheet :: SourceTable :: A{CurrentTable :: A3}) where CurrentTable A2 and A3 are "2" and "6" for rows A2:A6. Is this even possible? Hopefully I'm overcomplicating it and there's a magical function out there that I've missed.

  • How to get text lables in x axis for xcelsius bubble chart

    Hi
    How to get text values in x axis for xcelsius bubble chart
    I have data as follows
    x axis: closed/qualification/lost
    y axis: deal age
    z axis: amount(bubble size)
    Thanks

    If you are using Xcelsius 2008 SP3 you will be able to do this.

  • Slider + activating column switches for a column chart

    Hi,
    I am trying to make an Xcelsius presentation and because I am a bit stuck I thought that may be you could point me to some solution.
    It is a three element column chart 
          + three status switches for every column chart column (if the switch is On, then the slider should affect (i.e. increase/decrease) the corresponding column, otherwise not)
          + a vertical slider which should increase/decrease only those of the columns for which the corresponding column switches are set On. If no column switch is On, then the slider should not affect any column value.
    As I see it, an intermediate subtraction value for every column should be calculated, depending on the corresponding column switch and cur slider value. And this value should be subtracted from the current slider value in order to receive the right current value for every column. I have tried with some formulas but with no success.
    Or may be a totally different approach should be taken?
    (By the way, is there some way that Excel store/memorize in the excel table the various intermediate values for the corresponding columns, so that they dont always depend on a formula, but after they are calculated they are stored for later processing?)
    As I have tried many variants with no success, I am beginning to doubt if this could at all be achieved with Excelsius.
    Do you think this kind of functionality could somehow be organized with Excelsius?
    Just in case I have put [here|
    inspire.wdf.sap.corp\INSPIRE_Share\Raptor_share\tmp\example_frames.zip] (
    inspire.wdf.sap.corp\INSPIRE_Share\Raptor_share\tmp\example_frames.zip) example frames, which demonstrate what the functionality should do.
    Thanks!
    Edited by: Kiril Bratanov on Oct 22, 2009 10:01 AM

    Lisa,
    Numbers will "wrap" text in a cell if you selec the cell(s) where you want to to wrap and check the box:
    If there is more, then please post a screen shot of what you doc currently looks like and what you want to change.
    Best Regards,
    Wayne

  • I am getting the "urgent/out of date" notification. However, I have downloaded the "newer version" many times but it does not take. Why?

    Advanced search
    URGENT!
    Your version of Firefox is no longer protected against online attacks.
    Get the upgrade - it’s fast and free!
    About Mozilla

    HI,
    Thanks for the information. I am a bit nervous about the method because I get a "serious" warning when I put the command in the URL. Also, I wonder if you know the answer to this: Someone/Firefox pushed an upload tab to me. That is the best way I can explain what happened. Now, sometimes I get an ! in a triangle, sometimes I get an outdated message with the Firefox logo in place of the ! and sometimes it does not show an icon indicating the program is out of date. When I belly up to the URL and do the commands you mentioned, do you know if all these glitchy things will be taken care of? dmer

  • Get frequent data for each column of a table

    What is the best way to get the most frequent data in each column of a table.
    we have around 25 tables and each table has around 20 columns , so rather than writing group by for each column of table , is there any easy way to find this?
    example we have table
    Column A       Column B         Column C
    Apple             Monday             Red
    orange            Tuesday            Green
    Apple              Monday            Red
    Lemon            Wednesday       Green
    Apple               Thursday         Red
    in this table, column A's frequnt data is Apple , column B's frequent data is Monday , Column C's frequnt data is Red
    Apple 3          Monday 2                  Red 3
    Orange 2        Tuesday 1                 Green 2
    Lemon 1          Wednesday 1         
                          Thursday 1
    Group by kind of query will give this result, but with 20 tables each having 20 - 30 columns if we need similar kind of result ..  is there any way to get this data.

    Hi,
    GROUP BY (using aggregate functions) is the best way to do what you described.
    PIVOT and UNPIVOT are probably what you'd want in this case.  The phrase "GROUP BY" may not actually appear in your code, but you'll essentially be doing a GROUP BY.
    Analytic functions (rather than aggregate functions) can do the job, too, but they'll be less efficient.  Analytic functions get you results about the groups, without losing each row's identify, but in this case, losing each row's identity is eactly what you want to do.  You only want 'Apple' to appear 1 time, not 3 times.
    The fact that you need to do the same query on 20 different tables suggests that there's something wrong with your table design.  Wouldn't it be better to have 1 big table, with a new column that has 20 unique values instead?
    I hope this answers your question.
    If not, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible.  For example, instead of posting a problem with 20 tables, each having 25 columns, post a similar problem involving, say, 2 tables, each with 3 columns.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How to get the elements out of a for loop simultaneously during the loop execution

    Hi, 
    I am student. I would like to know how to get the counter values outside the For loop parallely while the loop runs rather that getting the finally value outside the For loop. Looking forward for answers.
    Thanks,
    Athira
    Solved!
    Go to Solution.

    You could use a notifier (since it is a single value) or a reference (with a property node) to a control that gets the value elsewhere in another VI.
    If it is within the same VI, you could use a property node (right click > create > property node > value) from the control within the same VI located outside the loop.
    If you promiss NOT to abuse the use of Local Variables, you could use that to only write from ONE location within the For Loop to a control outside the loop, similar to the property node mentionned earlier.  (Of course, I will be struct by lightening for mentionning that and scolded by other LabVIEW coders for having a change of heart on the use of Locals....  Shivers are already crawling up my spine).
    You could use a queue, but that might be an overkill, unless:  the count is generated faster than it is being read elsewhere...
    As crossrulz mentionned, can you describe what you will be doing with the count?  Because synchronizing data (fresh / stale / etc) is very important within LabVIEW as it executes based on dataflow rather than a sequential order.
    Hope this helps. 
    EDIT: 
    You have not fully provided the answer.  We figured that much of your code from your description, but what is reading the value of the count?  Is it in a separate loop?  If not, it may only deal with the first value, which is likely 0.  The proper advice depends on how you process the received data (count).

  • Function module for getting ekko ekpo ekbe, eket data for material & plant

    Hi  experts,
         I need to get data for me31l transactional data......for that i need ekbe purchasing document and
         material documents based on given material and plant and posting date or crop.....
        Please reply as soon as possible..
    Thanks in advance
    M Prasanna

    Hi ,
         Try this FM
         ISIDE_PDI_PDOC_INFO_READ
    Its get you all the purchase doc's info for creating outline agreement for the vendor..
    check and let me know...

  • How get SIMs when out of state for weeks ...

    I will be out of state for over a month and if I can locate an iPhone 4 would then transfer the 3GS to my spouse. So how would I go about getting a SIMs for my spouse to use through the remainder of the trip? We will visit six states or more and will not be at any one place very long.

    AT&T is nationwide in the US. A Sim card doesn't know what state you live in. Why don't you contact AT&T customer service (800-331-0500) and get an authoritative answer.
    You can only edit a post within 15 minutes of posting by clicking the symbol just left of the reply button.

  • Getting the last succesful logoin date for user

    Hi ,
    Iwant to write an java application which will take the userid and get the
    last sucessful login date.
    I used the sap ume apis for this purpose
    There is an API  getLastSuccessfulLogonDate() in the class IUserAccount.
    But it says
    Deprecated.  
    get last sucessful logon date NOTE: This attribute is not automatically updated during login.
    link :https://help.sap.com/javadocs/NW04/current/um/index.html
    What does "attribute not updated  automaticlaly during login implies".
    Is there any other method from where i can get this information
    Regards
    Manoj

    Few things to mention.
    I am using SAP Netweaver 2004s
    When i run the code
    thisUser = userFact.getUser(userid);
                IUserAccount userAccts[] = thisUser.getUserAccounts();
                 System.err.println(" Iterating in for loop ");
                for(int i=0; i<userAccts.length; i++)
                       d= userAccts<i>.getLastSuccessfulLogonDate();
                       System.err.println(" got date ");
                       result = d.toGMTString();
    I get the following exception
    Login date java.lang.NullPointerException
            at SecurityLogic.getLastSuccessfulLogonDate(Unknown Source)
            at SecurityRemoteObjectImpl0.getLastSuccessfulLogonDate(SecurityRemoteOb
    jectImpl0.java:125)
            at SecurityRemoteObjectImpl0p4_Skel.dispatch(SecurityRemoteObjectImpl0p4
    _Skel.java:186)
            at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl
    .java:304)
            at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:19
    3)
            at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4Se
    ssionProcessor.java:122)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSes
    sionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRu
    nner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:3
    7)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.ja
    va:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:1
    70)

  • How does one give out enough spaces for a column in SQL report ?

    How does one reserve enough spaces for a column in SQL report ?
    Ex: 2 columns defined as the following
    projectNo varchar2(10)
    ProjectName varchar2(50)
    When create an sql report, the report heading will show below. If my project name is " Tire Strength Test At Site R987654" . I need to get it to show in one line since it was defined as varchar2(50)
    projectNo     ProjectName
    A0001         Tire Strength
                  Test At Site
                  R987654 There got to be a way to get around here . Thanx in advance.
    tai

    I noticed the CSS Style settings only seem to work if using a "Standard Report Column". Unfortunately I have the need to define some report columns where undesired wrapping occurs as "Display as Text (based on LOV, does not save state)" and tried to avoid wrapping, but no luck - is there a way around this (other than performing the report query using a huge DECODE clause, which somewhat renders the LOV useless except for data entry)?
    Thanks in advance for any ideas,
    Holger

  • Problem in Loading data for clob column using sql ldr

    Hi,
    I am having problem in loading data for tables having clob column.
    Could anyone help me in correcting the below script for ctrl file inorder to load the data which is in mentioned format.
    Any help really appreciated.
    Table Script
    Create table samp
    no number,
    col1 clob,
    col2 clob
    Ctrl File
    options (skip =1)
    load data
    infile 'c:\1.csv'
    Replace into table samp
    fields terminated by ","
    trailing nullcols
    no,
    col1 Char(100000000) ,
    col2 Char(100000000) enclosed by '"' and '"'
    Data File(1.csv)
    1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
    2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"
    Error Encountered
    ORA-01461: can bind a LONG value only for insert into a LONG column
    Table sampThanks in advance

    I can't reproduce it on my 10.2.0.4.0. CTL file:
    load data
    INFILE *
    Replace into table samp
    fields terminated by ","
    trailing nullcols
    no,
    col1 Char(100000000) ,
    col2 Char(100000000) enclosed by '"' and '"'
    BEGINDATA
    1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
    2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"Loading:
    SQL> Create table samp
      2  (
      3  no number,
      4  col1 clob,
      5  col2 clob
      6  );
    Table created.
    SQL> host sqlldr scott/tiger control=c:\temp\samp.ctl log=c:\temp\samp.log
    SQL> select * from samp
      2  /
            NO
    COL1
    COL2
             1
    asdf
    assasadsdsdsd"sfasdfadf"sdsdsa,ssfsf
             2
    sfjass
    dksadk,kd,ss"dfdfjkdjfdk"sasfjaslaljs
            NO
    COL1
    COL2
    SQL> SY.

Maybe you are looking for