Topic
  • 2 replies
  • Latest Post - ‏2013-02-02T23:14:20Z by SystemAdmin
SystemAdmin
SystemAdmin
15496 Posts

Pinned topic Displaying two data items on X-axis of Line chart

‏2013-01-29T23:13:43Z |
Please help,

Scenario: I have records with date column in table, Based on the date and Indicator conditions I have to put those records in respective buckets and in the end display those buckets counts on the line chart.

Eg: ID Date filing Report Date Indicator

ABC 31-DEC-12 31-DEC-12 P

So the requirement is :

IF (report date = date filing) then count as ' Registered for this month bucket'

IF (report date = date filing) and ( indicator = 'P' ) then count as ' pending This month bucket' ...... and so on based on different indicators

IF (report date != date filing) and ( indicator = 'P' ) then count as 'Pending Last month'}
Problem I am facing is for the type of record which I have mentioned above where Dates are equal I have to count it in both as 'Registered for this month bucket' ( irrespective of any indicator) and ' pending this month bucket' (considering indicator)

Since one data item can hold only one value for particular record how should I make it count for both and then display that on the line chart.
Please let me know If any one can help ASAP..
Thanks in advance for help.
Updated on 2013-02-02T23:14:20Z at 2013-02-02T23:14:20Z by SystemAdmin
  • DanielWagemann
    DanielWagemann
    411 Posts

    Re: Displaying two data items on X-axis of Line chart

    ‏2013-01-30T16:30:18Z  
    You could take a UNION approach where you could create a single query for every bucket you need. The bucket limits would be done via the filter. That way you could count your record twice.

    There may also be a sub-query approach where you do the count for the date against the detail and then manipulate it further in the projected query.... This approach is in theory only as I have not tested it.
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Displaying two data items on X-axis of Line chart

    ‏2013-02-02T23:14:20Z  
    You could take a UNION approach where you could create a single query for every bucket you need. The bucket limits would be done via the filter. That way you could count your record twice.

    There may also be a sub-query approach where you do the count for the date against the detail and then manipulate it further in the projected query.... This approach is in theory only as I have not tested it.
    Thank you very much.. I really appreciate your help.
    I tried with the Union solution and it worked ...