How to avoid duplication of work, making a calculated AMOUNT field

Hi, I am trying to solve this problem;
In my DataSet (in a custom Admin folder), I have a list of tickets (with certain attributes), and some of them are duplicated:

For example
Ticket_id     Group_id             Ticket_date                Resource_name          Ticket_status       

5416          100000401       10/12/2007 7:10:31 am                Mr. A                 2
5416          100000401       9/1/2008 11:00:44 pm                 Mr. A                 2
57381         100000401       27/12/2007 11:37:11 am               Mr. A                 2
57381         100000401       15/1/2008 9:33:12 am                 Mr. A                 2
I want this duplication because I need it when I filter the dataset (using the Ticket_date) with two parameters:

Ticket_date between lower_limit_date and upper_limit_date

Then, inside the report, ticket number, if I take 2 files with the same ticket_id, I have a calculated field when I use the COUNT_DISTINCT and for each pair of tickets, that the meter is always = 1; in this way (in the report), I have the following fields:
Group_id           Count_tickects   Resource_name   

100000401              2                    Mr. A                
It's OK!

Now, if I want to count how many tickets have status = 2 (this means that they are closed), I want to get 2 and NO 4

I tried to use this calculation (tickets closed): SUM (CASE WHEN "Report #7 COMPLETE tickets". State Id ticket = 2 THEN 1 0 OTHERWISE END)
but I've always had the result of 4... and this does not, because the tickets are only 2...
I also tried to use an analytical function by using the PARTITION BY, but did not get the correct result

In other words, I want to achieve this goal:
Group_id           Count_tickects   Tickets Closed     Resource_name

100000401              2                     2             Mr.A
Any help will be appreciated

Alex

Hello

Why did you put in ELSE 0? You count 0s. If you omit the ELSE then you count only 1s.

Try COUNT_DISTINCT (BOX WHEN Ticket Status Id = 2 THEN ticket_id END) like in my previous thread.

Rod West

Tags: Business Intelligence

Similar Questions

  • How to avoid duplication in the title?

    I have a video of five minutes with a title of general text / by default at the beginning and at the end. When I change the text in the opening title, the text in the title of fence is replaced by this same text. When I change the closing title text, this edition is recalled in the opening title. How can I change the text in a title so that it does not change the text in the other title?

    I tried this edit title several times. It always happens in the same way. I want the opening title to say one thing and the closing title to say to each other.

    This article goes into detail, and contains links to some useful articles of titration: http://forums.adobe.com/message/5563721#5563721

    Good luck

    Hunt

  • How to avoid duplication of the menu (in css) elements of the Apex?

    Hi all

    I used the css template to say Menu (admin manager, Manager of symbol, the price to the model), I also have a drop point say "category" in the application. now, wat happens is... When I place the mouse on the choice of selection if it displays but the overlapps the item (category) the choice of the menu... bocz of this I am unable to see the menu?

    How can I display the Menu correctly?

    I used the Z-index: 1 for the Menu... then also no change or reflectd...


    Please help me!



    David

    Hello

    OK - you can then switch the drop-down list in your mclose() function - this function include:

    $x('P1_LIST_ITEM_NAME').style.display = 'block';
    

    Andy

  • How to avoid duplication

    I am facing a problem, put out the query must be such that it should return an a.claim_no (he is core_business.cb_pensioner a PK), where as it is returned from the claim_no in duplicate.
    This is data of old age pensioners, it takes account of every retiree with respective information.
    I'll be v thank full for your advice.

    SELECT a.claim_no,  a.NAME,  a.old_nic_no,  a.new_nic_no,
                 LPAD (ip_region_fo_code, 4, 0) || ip_check_digit || LPAD (ip_serial_no, 6, 0)   AS eobi_no,
              rate_change_date,    pension_amount,   a.bank_code ,c.name bank_name ,  a.branch_code, B.ADDRESS,  b.name branch_name, d.name branch_city,date_of_birth,  a. region_fo_code
         FROM core_business.cb_pensioner a, 
         general_information.cb_branch b,
         general_information.cb_bank c,
         general_information.cb_city d
        WHERE    a. status = 'A' 
              AND SUBSTR (claim_no, 3, 1) <> 'S'
              AND (old_nic_no IS NOT NULL OR new_nic_no IS NOT NULL)
              AND SUBSTR (old_nic_no, 1, 3) <> '000'
              AND SUBSTR (old_nic_no, 8, 6) <> '000000'
              AND SUBSTR (old_nic_no, 8, 6) <> '101010'
             /* AND a.bank_code = 3
              AND EXISTS
                     (SELECT NULL
                        FROM general_information.cb_branch b
                       WHERE a.bank_code = b.bank_code
                             AND a.branch_code = b.branch_code)*/ 
                             and a.bank_code = c.bank_code 
                             and a.branch_code = b.branch_code
                             and b.city_code = d.city_code;

    Hello

    then the general table of duplicates. What I sometimes do, is to include the ROWID from all of the tables (a.rowid, b.rowid, c.rowid, d.rowid). If you find records where the main table has the same ROWID, but one of the other tables so you know what are the tables gives you the duplicate lines. With the row ID (or PK), you can find out why you have duplicates. Maybe in the paintings of general_information data have a time factor, so there may be duplicate codes.

    Herald tiomela
    http://htendam.WordPress.com

  • How to avoid synchronization of the settings between two computers

    I have two computers (a desktop computer all-in-one DELL and HP laptop).  Log-in at once is my Microsoft account.

    PROBLEM: When I 'customize' screen on one, the same changes are made on the other.   It is not desirable.  How to avoid that, far from making a second Microsoft account?

    To clarify - the ICONS are not duplicated, just any changes made to the themes of office such as colors or backgrounds.

    Thanks in advance!

    Hello Beckinista,

    Thanks for posting your question on the Microsoft community.

    Thank you for your query details.

    I also like the fact you want to avoid synchronization of the settings between two computers.

    I suggest you stop the synchronization of all of the settings between two computers and check if it helps.

    Please see this link:
    Sync between multiple PCs with OneDrive settings
    http://Windows.Microsoft.com/en-us/Windows-8/sync-settings-PCs

    Note: Please see section "to stop all sync settings" in the article above.

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • Camileo S10 - how to avoid the 'information' during video playback on TV

    I just received my Camileo S10... very nice indeed... but how to avoid the track and reading data to be shown on the screen during playback on my TV...?

    Go to the movies, then before you start playing click the OK button. This also works when you save. You must do this before playing or recording.

  • How to avoid the DPP transfer CR2 on desktop

    Hello

    Please if you can help me;

    My OS-> XP pro SP3
    My PLR-> version 3.14.15

    When I drag an image (size cr2) DPP automatically, it is transferred to
    screen area.

    How to avoid this?

    Import your images into the folder you want first, and then use PLR for access to this folder and from there we can work better. Otherwise, on DPP to start, choose a different folder of office (on the left, you may need to toggle the DISPLAY of RECORDS).

  • How to avoid the launch of Labview when called by Teststand VI

    Hi, friends.

    I am a student of teststand. I wrote a few screws by Labview. Now, I want to invoke in teststand environment. But when I run the sequence. LabVIEW automatically launches. How to avoid the launch of Labview when I run the sequence?

    Thank you.

    I'm not sure that I follow what you're saying...  But it seems that when the VI is called, the LabVIEW Development software is started and you want to avoid this.

    If you create an executable file or a dll and that any call within TestStand, she should not call the development environment.  You must have the LabVIEW runtime engine installed on the target computer.

    For several years I used TestStand with LV, if my memory does not have to be precise.  I think that the above worked for me.  However, it seems that I remember something to have the LV code in debug mode, causing to open development environment... but it's a distant memory.    You do not use breakpoints where the LV VI is called, are you?

    R

  • Refreshing the page creates a new record – how to avoid this?

    I have a 'submit' button that runs a 'record insertion.

    After insertion is made I branch (back) to this same page.

    The problem is that when I hit page refresh the folder gets reinserted.

    How to avoid this behavior?

    AZZ says:

    fac586,

    Yes. You are right. It was a late semi written post. My apologies. You must stop working after midnight.

    Let me clarify:

    I have a SUBMIT"" button.

    There are the conditional 'after send' (if the key) process.

    the process calls a function that inserts a new record in the table.

    Question:

    How can I avoid running the process on refreshing the page?

    I've simplified the situation - no record insertion. However, if you refresh the page the success of the function call message will be displayed.

    https://Apex.Oracle.com/pls/Apex/f?p=4000:1:126172565551184:no:RP:FB_FLOW_ID, F4000_P1_FLOW:21325, 21325

    user/pass help/help

    workspace - AZ_

    To reproduce:

    Click on the submit - observe green popup "OK!"

    Refresh the page (F5 or ctrl-R) - see 'OK!' again.

    No process is executed to see the page or page refresh. This can be confirmed by looking at track of debugging to see the processing page. The page contains no defined process to run at a show of page processing point; None of the calculations which could call a function that could not perform an insert as a side effect; None of the dynamic actions or calls JS could initiate an insertion using AJAX; Neither the source region contains any code that could do it. I'll draw the line search conditions that can contain deeply buried code which could be responsible and direct you to a previous thread of the same nature: success of process Message not tied to Conditions.

  • How to avoid the report query needs a unique key to identify each line

    Hello

    How to avoid the error below

    The report query needs a unique key to identify each row. The supplied key cannot be used for this query. Please change the report attributes to define a unique key column.

    I have master-detail tables but without constraints, when I created a query as dept, emp table he gave me above the error.

    Select d.deptno, e.ename

    by d, e emp dept

    where e.deptno = d.deptno

    Thank you and best regards,

    Ashish

    Hi mickael,.

    Work on interactive report?

    You must set the column link (in the attributes report) to something other than "link to display single line." You can set it to 'Exclude the column link' or 'target link to Custom.

  • Modal region of the tree as a popup... After clicking the value in the tree... How to avoid the parent page is refreshing

    Hi, I spent long hours to solve this problem and wait for the answer from the expert.

    I created a form with text boxes and one of them, I created just small image button to call the modal region of the tree.

    Everything is OK, tree appear and disappear after the passage of the code value for the text element in the parent form.

    But it refreshed and initialized all other areas of empty text as well... ^ ^;

    I think that, because of the link in SQL tree. Someone help me?

    Select case when connect_by_isleaf = 1 then 0

    When level = 1 then 1

    else                           -1

    end the status,

    level,

    "CAT_NM" as the title,

    NULL as an icon,

    "CAT_CD" as a value.

    NULL as ToolTip,

    ? p = & APP_ID.:112 :'|| : APP_SESSION |': P112_CAT_CD :'|| "' CAT_CD ' as link-> How to avoid refreshing the page parent and just switch the CAT_CD to the called page?

    'category '.

    Start with 'PARENT_CAT_CD' is null

    connect prior "CAT_CD" = "PARENT_CAT_CD."

    siblings arrested by "CAT_CD".

    Hey "zoomok,"

    Large - an example would have been my next request in any case I took a glance and changed your demo page to work as you want.

    Things of note:

    -SQL source tree: NO link value! A link value will generate apex code that will redirect you to the link. It will always be a redirect page, where a rerender page, and not what you want! Leaving NULL allows us to interact with the tree interactively via javascript

    -Code in variables and functions global page - javascript - next:

    function treeOnload(){
      var l$Tree = $("#tree_modal div.tree"); // get the tree instance
      // handle the onselect event of the tree
      $.tree.reference(l$Tree).settings.callback.onselect = function(NODE, TREE_OBJ){
        $s( "P112_CAT_CD", $(NODE).attr('id') ); // get the VALUE of the node and put it in item P112_CAT_CD
        closeModal(); // close the active modal region
      };
    };
    

    -In javascript - dependent section I added a call to this procedure:

    treeOnload(); // initialize the tree with our settings
    

    And that's all! I didn't know that you use "openModal". There are different ways to implement modal regions, so it is important to know how we do for ourselves what to do with it.

    FYI - you now need to change your credentials. And mark the answer that has helped you or is correct, please.

  • Question CP9: HTML5: Apple: Android: how to avoid the click on the Play button / tap?

    Hello

    Captivate 9.0.0.223: HTML5 draft.

    I'm sorry to ask this question, it's a little old chestnut on HTML5 in Apple iOS and Android.

    I have searched on the internet and forums for a solution underway, but could not find something that works.

    The problem is how to avoid the PLAY button, which forces the user to click / tap on it, when the project is accessible on an Apple or Android system.

    Play_icon.png

    The project will be published on the internet for use on any Windows, Apple or Android device.

    I have no control over the Web server or devices that will use the people, so that any changes to the software server or browser is out of the question.

    I have tried both a plain HTML5 and a responsive project, but neither avoid the Play button. I put an example of 1 slide on these links.

    http://www.hoffits.com/test_responsive/index.html

    http://www.hoffits.com/test_html5/index.html

    The bottom line is: ' is it possible to remove the need for the user to click / press the Play button?

    Thank you.

    Peter

    Cardiff

    In Wales

    UK

    In your normal HTML5, there is a line (I think it's 46) with this code:

    CP. DoCPInit();

    Add cp.movie.play (); Located below.

    so:

    CP. DoCPInit();

    CP. Movie.Play ();

  • How to avoid the glossy look and brilliant nostrils?

    I just built my first character of fuse and when I import into Photoshop, its nostrils are incandescent - as if the light shines through the back of his head!

    This fuse:

    Screen Shot 2016-01-17 at 04.27.53.png

    Becomes this in Photoshop:

    Screen Shot 2016-01-17 at 04.47.21.png

    I use a brush to set the nostrils, but have no idea how fix eye - of the suggestions?

    Even better - any ideas on how to avoid the glossy look and glowing nostrils?

    Thank you very much
    Malcolm

    Hey, Malcolm.

    Best way to explain what basically rendering 3D correctly really takes a lot of time, haha.  So that you may be able to work with the real-time 3D model and make changes quickly, we use two different rendering methods.

    There is an "Interactive" mode which is not like the beautiful light/shade, but is very fast - and that's what you see when you interact with the default template.

    Then, there is a mode "Raytraced" which is much more advanced calculations and stuff to give you a proper lighting / shadow.  Raytraced rendered may take time if so we can not use it all the time.

    In order to get the lights/shadows appropriate you need to perform a path Ray would make on the document.  Best way to do this:

    • Select your 3D layer in the layers panel
    • Make a selection in the drawing area to the area that you want to make (I recommend to test rendering of area to check the lighting/shadows before committing to make the whole layer).
    • Push the button is rendered at the bottom of the properties panel (it looks like a cube in a rectangle box, right next to the delete icon).

    There are other things that you must do if you want to get the best image search quality such as the addition of secondary lights!  You can add more lights in the 3D Panel using the small icon of light at the bottom.  Have 2-3 stage lights and adjusting their colors can make a big difference with the Assembly of your character in the scene.  Here is a small image for some comparisons:

    You can see the image with two lights a look much more realistic lighting and shadows and raytraced of one and two versions are much nicer and cleaner!

    Hope that helps!

  • I place an image in Muse, but when I made it smaller, it lost quality. How he avoid losing quality?

    I placed a picture of Muse, but when I made it smaller, it lost quality. How he avoid losing quality?

    When I increase a picture different quality he lost.

    You're it resize proportionally? By that I mean to keep the same aspect of dimension?

    For example, if the image is 200 x 200 pixels, and you resize it to 100 x 100, it should work well in most cases. If you resize it to 100 x 80 for example that it will distort

    To increase the size of the image it will lose almost always of quality. This isn't something to Muse that is a general problem in computer science.

  • CACHE PROBLEM: How to avoid the browsers to load the version of the old site?

    Hi, I am wondering how to avoid browsers to load a cache version o a Web site. Whenever make us changes and upload them via FTP directly from Muse, the only way to see the changes visualizes the site in a private browser tab or wait a few days to see the normal mode.

    Is there a possibility of adding metadata in the properties of the page (html for the head) or something to push the browser not to save versions of cache and refresh constantly?

    Maybe... what I have to delete in FilleZilla all content and load again to see the changes immediately or that does not work either?

    Thank you!

    We cannot control the behavior of the browser for end of fonts of the site for users accessing the site, but about the refresh of the page, you can add snippet of javascript for automatic page refresh.

    http://StackOverflow.com/questions/4644027/how-to-automatically-reload-a-page-after-a-give n period of inactivity

    http://StackOverflow.com/questions/19807665/auto-refresh-for-every-5-mins

    Thank you

    Sanjit

Maybe you are looking for