How to count distinct exclusion of a value in the business layer?

Hi all

I have a column that has a lot of values. I need to do is a measure with aggregator separate count. But I shouldn't count 0 in the column. How can I do that. If I try to use any way to condition the aggregator option is disable. Help, please

Thank you

Look at this example:

I did MDB table is DIRTY as:

Count_Distinct_Prod_Id_Exclude_Prod_Id_144

I'll count distinct PRODUCTS. PROD_ID, but exclude PROD_ID = 144 when counting.

Make this measure like this:

1. new column object/logic
2. go in tab data type and click EDIT the table logic table source
3. now, in the general tab add join of a table (in my case of PRODUCTS)
4. go in the column mapping tab-> see the deleted column mapping

5. in the new column (in my case Count_Distinct_Prod_Id_Exclude_Prod_Id_144) write similar code:
CASE WHEN "orcl". » ». "" SH ". "PRODUCTS '." "' PROD_ID ' = 144 THEN ELSE NULL"orcl ". » ». "" SH ". "PRODUCTS '." "' PROD_ID ' END

6. click OK and close the source logical table
7. now, in the logical column window go to the tab of the aggregation and choose COUNT DISTINCT.

8. move the Count_Distinct_Prod_Id_Exclude_Prod_Id_144 measure for presentation

9 test answers (report cointains columns as follows)

PROD_CATEGORY_ID
Count_Distinct_Prod_Id_Exclude_Prod_Id_144

And the result in the NQQuery.log is:

Select T21473. PROD_CATEGORY_ID C1,
Count (distinct from cases when T21473.) PROD_ID is 144, then NULL else T21473. End PROD_ID) C2
Of
PRODUCTS T21473
Group of T21473. PROD_CATEGORY_ID
order of c1

Concerning
Goran
http://108obiee.blogspot.com

Tags: Business Intelligence

Similar Questions

  • How to get the value of the gradient layer properties?

    Hi all

    I want to get the properties of the gradient layer such as its name, the value of the color and mode?

    The properties also like angle, style and scale that appears in the Panel of gradient fill, when we create the gradient layer?

    Thank you

    There are many parameters of a layer of setting gradientFill. I think that there are always at least two stages of color (even if they are the same color). And I'm not sure what you mean by 'mode '.

    Here's a way to get the layer settings.

    function getGradientFillAdjustmentInfo(){
        if(app.documents.length==0 || app.activeDocument.activeLayer.kind != LayerKind.GRADIENTFILL ) return;
        var gradientInfo = {};
        gradientInfo.toString = function(){return "GradientInfo";}
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var desc = executeActionGet(ref).getList(charIDToTypeID("Adjs")).getObjectValue(0);
        if(desc.hasKey(charIDToTypeID("Dthr"))) gradientInfo.dither = desc.getBoolean(charIDToTypeID("Dthr"));
        if(desc.hasKey(charIDToTypeID("Rvrs"))) gradientInfo.reverse = desc.getBoolean(charIDToTypeID("Rvrs"));
        if(desc.hasKey(charIDToTypeID("Angl"))) gradientInfo.angle = desc.getDouble(charIDToTypeID("Angl"));
        if(desc.hasKey(charIDToTypeID("Type"))) gradientInfo.type = typeIDToStringID(desc.getEnumerationValue(charIDToTypeID("Type")));
        if(desc.hasKey(charIDToTypeID("Scl "))) gradientInfo.scale = desc.getDouble(charIDToTypeID("Scl "));
        if(desc.hasKey(charIDToTypeID("Ofst"))){
                    gradientInfo.offset = [desc.getObjectValue(charIDToTypeID("Ofst")).getUnitDoubleValue(charIDToTypeID("Hrzn")),
                                                    desc.getObjectValue(charIDToTypeID("Ofst")).getUnitDoubleValue(charIDToTypeID("Vrtc"))];
        }
        desc = desc.getObjectValue(charIDToTypeID("Grad"));
        gradientInfo.name = desc.getString(charIDToTypeID("Nm  "));
        gradientInfo.gradientForm = typeIDToStringID(desc.getEnumerationValue(charIDToTypeID("GrdF")));
        var colorList = desc.getList(charIDToTypeID("Clrs"));
        var transList = desc.getList(charIDToTypeID("Trns"));
        gradientInfo.numberOfColorStops = colorList.count;
        gradientInfo.colorStops = [];
        for(var colorIndex=0;colorIndex		   
  • BlackBerry Smartphones how an e-mail as a default value in the mail acconts

    Hello

    can someone help me make a default value of e-mail to send and email to my blackberry.

    I have several e-mail account and I want to make one of them as a default.

    Thanks in advance

    KB11471 How to change the default email on the BlackBerry smartphone account

  • How to keep English as a default value in the spell checker after adding another dictionary?

    I added a Spanish dictionary for firefox that I sometimes email Spanish-speaking. Since then, the spell checker has stuck to Spanish language by default whenever I restart the browser.
    As soon as I select English, it remains until I close the browser. But goes back to Spanish when I open a new window.
    I tried every setting I could find, and I also tried to remove and reinstall both languages via add dictionary.
    I am at a loss. Can anyone offer some advice?
    Thank you

    You can check the spellchecker.dictionary pref setting on the topic: config page and if the pref tells the user the value (in bold) and then try to reset via the context menu to the default value.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

    If you do not keep the changes after a reboot or have problems with preferences, see:

  • How to get a CMYK color RGB values in the DOM (CS5)

    (CS5, Actionscript)

    Hi all

    I have an InDesign document containing the frameworks for related texts that border colors are specified in the form of a CMYK picture.

    I wish I could get her color specification its closest equivalent RGB.

    The InDesign DOM contains a method to do it automatically for me?  If not, are there workarounds?

    TIA,

    mlavie

    Change ColorSpace.CMYK to ColorSpace.RGB color space, and ID will do the conversion for you.

    Of course, this changes the color applied, so don't forget to reset on CMYK when you have finished reading.

  • the external script file... How to generate a code via a value on the table

    Hello

    I have a customer interactive report (0ver 200) with zoom before capacity... when the user clicks an individual customer, a new report (client profile) opens with the details on the customer's product, etc... I try to add the latest news through Google RSS reader in customer profile report... Following the code works very well for company ABC (symbal ABC Stock. (TO)...

    < html >
    < body >

    < script src = "http://www.gmodules.com/ig/ifr?url=http :// www.ajaxgaier.com/iGoogle/rss-reader%2B.xml & amp;" up_title = News & amp;up_feed=http%3A%2F%2Ffinance.yahoo.com%2Frss%2Fheadline%3Fs%3DABC.TO & amp; up_contentnr = 10 & amp; up_fontsize = 12 & amp; up_titlelink = & amp; up_bullet = 1 & amp; up_reload_feed = 1 & amp; up_reload_fqcy = 0 & amp; synd. = open the & amp; w = 394 & amp; h = 255 & amp; title = News & amp; border = % 23ffffff % 7C3px % 2C1px + solid + % 23999999 & amp; output = js "> < / script >.

    < / body >
    < / html >


    Is there a way to make the above dynamic code, which means that when I click on the ABC Company (from my customer interactive report), then the next page should have news and product of the client (as the code shown above) associated with the ABC company...

    But when I click on company BCE (from my customer interactive report) then the next page should have news and products clients related to business ECB...

    Thanks in advance...

    Talbot wrote:
    the foregoing suppose to work...?

    try changing:

    TO:

    Van
    Trent

  • How to move from the physical layer to the business layer

    Hello

    I added schema SH to my physical layer, how to move that layer business and layer of presentation? If I want all the tables and the columns of this pattern to my company and Presenattion of the layer.

    Thank you.

    Hello

    Please find below the link he gives step by step help you from beginning to advance

    http://www.Oracle.com/technology/OBE/obe_bi/bi_ee_1013/bi_admin/biadmin.html

    assign as correct, so useful

    Thank you

  • How to create a mobile blog page layout, combining the Business Catalyst Modules and function of mobile design of Adobe Muse?

    The title says it all. I love the ability of Adobe mobile design Muse and tablet of layouts and became very fond of the workflow between Adobe Muse and Business Catalyst. The only problem I found is the ability to integrate the module blog on a drawing of the design or the mobile tablet. I understand that Business Catalyst has insert you a code of the tag to create a page template for the blog to sit in but is possible to have a mobile phone and Tablet for the same blog layout? I'd love if visitors read my blog from their phone, did not have to move from a phone on a desk combination available just to read the blog. Once they have read / switch the blog, they can no longer return to the mobile version of Web site due to the page template that I posted to the blog. Overall, I want just the ability to have the blog to adapt to all mobile, tablet and desktop versions. Any ideas?

    It's a very interesting question. Your regular blog module should be fine for the tablet. For some time I did a mobile in British Colombia, but I think you can add a template to another blog layout module and use it. You should be able to actually build a custom template in British Colombia for that as well. Maybe pop on the BC Forum and see. There is a guy named Liam on the BC forums who probably knows more about BC some of the engineers. ;-)

    You can also add a link to the mobile device quite easily. You can even hide the link and show the iff only that the user is on a phone using the {system_visitorDeviceClass} tag in British Colombia.

    More information on that here: Introducing tablet & phone support for sites

  • Get the RANK of values to the end user using the A-team

    In my rest, class of service (Department) it is a function (POST) who receive the range of values of its consumers and returns List < and >.

    It is the function

    @POST

    @Path("{from}/{to}/Departments")

    @Produces ({"application/json"})

    public list < departments > findRange (around @PathParam("from"), around @PathParam("to") to) {}

    Return super.findRange (new int [] {, to});

    }

    Persistence A-team Accelerator, duties DepartmentSevice (DC) are pre-built, please how I can configure rang of function values in the class DepartmentService and call or manipulate the AMX page so that the end user can be entered range values during the operation in his mobile?

    Rest of the a-Team/json in place of Images:

    get2.gif

    get1.gif

    Thank you.

    Best regards

    Bartholomew

    Hi Steven thanks for your comment I intentionally use the post to test whether it is possible to rotate to GET the other way round.so I wore your instructions and it workd

    Thank you very much

    Best regards

    Bartholomew

  • How do I AppleScript implementation of a pdf page in a layer

    I have a PDF file with 25 pages that I need to enter in the form of an Illustrator file with 25 layers.

    I found the example of opening a particular page of a PDF (according to the CS6), and that works.

    And I can create layers.

    But I can't figure out how to place a particular page of a PDF file in the new layer. Where and how can I provide the info from the page?

    (I have a PostScript program that generates the work of signs that should be engraved on the TechShop laser. The interface of laser uses Illustrator and a special print driver.

    I noticed that a page of a PDF file opening positions content a little differently place this page, when I do it manually, so I thought I would create the layered Illustrator file by opening a page (which works) by placing the pages into their own layers, and then by removing the first page. Then the positioning will be consistent.

    But I'm stuck at placing a PDF page...)

    Tell application "Adobe Illustrator" to activate

    -This function opens the file passed as

    -a file reference parameter, to my page.

    -fileToOpen is a reference to a several page PDF file

    - and must be set before calling this function.

    on openMultipageFile (fileToOpen, myPage)

    Tell application "Adobe Illustrator"

    Set the level of user interaction never interact

    PDF file of the settings options page myPage value

    Open the file fileToOpen without dialog boxes

    tell the end

    end openMultipageFile

    Set myFile to "DBG:Friendship Forest Tree plates: FriendshipForestTrees TopAcrossLogo.pdf.

    myPages Set 1

    openMultipageFile (myFile, myPages)

    Tell application "Adobe Illustrator"

    the bottomLayer value to the new layer ¬

    at the end of the document 1 with properties {name: "Coat N2"}

    tell the end

    Tell application "Adobe Illustrator"

    itemPosition the value {100.0, 200.0}

    Set the level of user interaction never interact

    PDF file of the settings options page the value 2

    the value of placedRef to make a new item placed in the layer "layer N2' of the document 1 ¬

    with properties {file:myFile, position: itemPosition}

    tell the end

    You can watch this instead of reinventing the wheel

    http://forums.Adobe.com/thread/946055?TSTART=360

  • Can I write an expression for a value of the model you are looking at, rather than a specific model?

    I know that I can make an expression to a particular layer in a model specific to get a value, for example. COMP ("OpeningTitle01"). Layer ("TITLENAME") .text .sourceText will get the value of the TITLENAME layer in the model OpeningTitle01, but I want to make several compositions (so I can add them to the queue of rendering at the same time) where each will change the value of the underlying model.  Is this possible?  The model where I will use the expression is nested on 5 levels below the top level, and I want to put the value in a layer in each of the new compositions.  Any help is appreciated-thanks guys!

    If what you're asking, is if you can use an expression to cause a layer inside precomp to render different text based on that comp the precomp happens to be nested in, the answer is no.

  • Values of the parameters of a hue/Sat adjustment layer.

    Hello world!

    I'm sorry but I desperately seek a function for photoshop CS5 that changes the value of a HUE/Saturation adjustment layer.

    I searched several times on the internet but cannot find.

    I also tried with the scriptlistener but when I change the values of the adjustment layer, nothing written in the newspapers.

    Could someone else please? Thanks in advance.

    Does that help?

    #target photoshop

    setHueSatForLuminance ([0, 60, 0], [9, -30, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]);

    the hue/sat-layer function;

    function setHueSatForLuminance (master, red, yellow, green, blue, cyan, magenta) {}

    // =======================================================

    var idMk = charIDToTypeID ("Mk");

    var desc43 = new ActionDescriptor();

    var idnull = charIDToTypeID ("null");

    var ref8 = new ActionReference();

    var idAdjL = charIDToTypeID ("AdjL");

    Ref8.putClass (idAdjL);

    desc43.putReference (idnull, ref8);

    var idUsng = charIDToTypeID ("Usng");

    var desc44 = new ActionDescriptor();

    var idType is charIDToTypeID ('Type');.

    var desc45 = new ActionDescriptor();

    var idpresetKind = stringIDToTypeID ("presetKind");

    var idpresetKindType = stringIDToTypeID ("presetKindType");

    var idpresetKindDefault = stringIDToTypeID ("presetKindDefault");

    desc45.putEnumerated (idpresetKind, idpresetKindType, idpresetKindDefault);

    var idClrz = charIDToTypeID ("Clrz");

    desc45.putBoolean (idClrz, false);

    var idHStr = charIDToTypeID ("HStr");

    desc44.putObject (idType, idHStr, desc45);

    var idAdjL = charIDToTypeID ("AdjL");

    desc43.putObject (idUsng, idAdjL, desc44);

    executeAction (idMk, desc43, DialogModes.NO);

    // =======================================================

    var idsetd = charIDToTypeID ("setd");

    var desc46 = new ActionDescriptor();

    var idnull = charIDToTypeID ("null");

    var ref9 = new ActionReference();

    var idAdjL = charIDToTypeID ("AdjL");

    var idOrdn = charIDToTypeID ('Ordn');

    var idTrgt = charIDToTypeID ("Trgt");

    Ref9.putEnumerated (idAdjL, idOrdn, idTrgt);

    desc46.putReference (idnull, ref9);

    idT var = charIDToTypeID ("T");

    var desc47 = new ActionDescriptor();

    var idpresetKind = stringIDToTypeID ("presetKind");

    var idpresetKindType = stringIDToTypeID ("presetKindType");

    var idpresetKindCustom = stringIDToTypeID ("presetKindCustom");

    desc47.putEnumerated (idpresetKind, idpresetKindType, idpresetKindCustom);

    var idAdjs = charIDToTypeID ('Adjs');

    var list3 = new ActionList();

    var desc12 = new ActionDescriptor();

    HDI var = charIDToTypeID ('H');

    desc12.putInteger (HDI, master [0]);

    var idStrt = charIDToTypeID ("TRT");

    desc12.putInteger (idStrt, master [1]);

    var idLght = charIDToTypeID ("Lght");

    desc12.putInteger (idLght, [2] master);

    var idHsttwo = charIDToTypeID ("TVH2");

    list3.putObject (idHsttwo, desc12);

    var desc48 = new ActionDescriptor();

    var idLclR = charIDToTypeID ("Lee");

    desc48.putInteger (idLclR, 1);

    var idBgnR = charIDToTypeID ("BgnR");

    desc48.putInteger (idBgnR, 315);

    var idBgnS = charIDToTypeID ("BgnS");

    desc48.putInteger (idBgnS, 345);

    var idEndS is charIDToTypeID ("purpose");.

    desc48.putInteger (idEndS, 15);

    var idEndR = charIDToTypeID ('James');

    desc48.putInteger (idEndR, 45);

    HDI var = charIDToTypeID ('H');

    desc48.putInteger (HDI, Red [0]);

    var idStrt = charIDToTypeID ("TRT");

    desc48.putInteger (idStrt, Red [1]);

    var idLght = charIDToTypeID ("Lght");

    desc48.putInteger (idLght, Red [2]);

    var idHsttwo = charIDToTypeID ("TVH2");

    list3.putObject (idHsttwo, desc48);

    var desc49 = new ActionDescriptor();

    var idLclR = charIDToTypeID ("Lee");

    desc49.putInteger (idLclR, 2);

    var idBgnR = charIDToTypeID ("BgnR");

    desc49.putInteger (idBgnR, 15);

    var idBgnS = charIDToTypeID ("BgnS");

    desc49.putInteger (idBgnS, 45);

    var idEndS is charIDToTypeID ("purpose");.

    desc49.putInteger (idEndS, 75);

    var idEndR = charIDToTypeID ('James');

    desc49.putInteger (idEndR, 105);

    HDI var = charIDToTypeID ('H');

    desc49.putInteger (HDI, yellow [0]);

    var idStrt = charIDToTypeID ("TRT");

    desc49.putInteger (idStrt, yellow [1]);

    var idLght = charIDToTypeID ("Lght");

    desc49.putInteger (idLght, yellow [2]);

    var idHsttwo = charIDToTypeID ("TVH2");

    list3.putObject (idHsttwo, desc49);

    var desc50 = new ActionDescriptor();

    var idLclR = charIDToTypeID ("Lee");

    desc50.putInteger (idLclR, 3);

    var idBgnR = charIDToTypeID ("BgnR");

    desc50.putInteger (idBgnR, 75);

    var idBgnS = charIDToTypeID ("BgnS");

    desc50.putInteger (idBgnS, 105);

    var idEndS is charIDToTypeID ("purpose");.

    desc50.putInteger (idEndS, 135);

    var idEndR = charIDToTypeID ('James');

    desc50.putInteger (idEndR, 165);

    HDI var = charIDToTypeID ('H');

    desc50.putInteger (HDI, green [0]);

    var idStrt = charIDToTypeID ("TRT");

    desc50.putInteger (idStrt, green [1]);

    var idLght = charIDToTypeID ("Lght");

    desc50.putInteger (idLght, green [1]);

    var idHsttwo = charIDToTypeID ("TVH2");

    list3.putObject (idHsttwo, desc50);

    var desc51 = new ActionDescriptor();

    var idLclR = charIDToTypeID ("Lee");

    desc51.putInteger (idLclR, 4);

    var idBgnR = charIDToTypeID ("BgnR");

    desc51.putInteger (idBgnR, 135);

    var idBgnS = charIDToTypeID ("BgnS");

    desc51.putInteger (idBgnS, 165);

    var idEndS is charIDToTypeID ("purpose");.

    desc51.putInteger (idEndS, 195);

    var idEndR = charIDToTypeID ('James');

    desc51.putInteger (idEndR, 225);

    HDI var = charIDToTypeID ('H');

    desc51.putInteger (HDI, blue [0]);

    var idStrt = charIDToTypeID ("TRT");

    desc51.putInteger (idStrt, blue [1]);

    var idLght = charIDToTypeID ("Lght");

    desc51.putInteger (idLght, blue [2]);

    var idHsttwo = charIDToTypeID ("TVH2");

    list3.putObject (idHsttwo, desc51);

    var desc52 = new ActionDescriptor();

    var idLclR = charIDToTypeID ("Lee");

    desc52.putInteger (idLclR, 5);

    var idBgnR = charIDToTypeID ("BgnR");

    desc52.putInteger (idBgnR, 195);

    var idBgnS = charIDToTypeID ("BgnS");

    desc52.putInteger (idBgnS, 225);

    var idEndS is charIDToTypeID ("purpose");.

    desc52.putInteger (idEndS, 255);

    var idEndR = charIDToTypeID ('James');

    desc52.putInteger (idEndR, 285);

    HDI var = charIDToTypeID ('H');

    desc52.putInteger (HDI, cyan [0]);

    var idStrt = charIDToTypeID ("TRT");

    desc52.putInteger (idStrt, cyan [1]);

    var idLght = charIDToTypeID ("Lght");

    desc52.putInteger (idLght, cyan [2]);

    var idHsttwo = charIDToTypeID ("TVH2");

    list3.putObject (idHsttwo, desc52);

    var desc53 = new ActionDescriptor();

    var idLclR = charIDToTypeID ("Lee");

    desc53.putInteger (idLclR, 6);

    var idBgnR = charIDToTypeID ("BgnR");

    desc53.putInteger (idBgnR, 255);

    var idBgnS = charIDToTypeID ("BgnS");

    desc53.putInteger (idBgnS, 285);

    var idEndS is charIDToTypeID ("purpose");.

    desc53.putInteger (idEndS, 315);

    var idEndR = charIDToTypeID ('James');

    desc53.putInteger (idEndR, 345);

    HDI var = charIDToTypeID ('H');

    desc53.putInteger (HDI, magenta [0]);

    var idStrt = charIDToTypeID ("TRT");

    desc53.putInteger (idStrt, magenta [1]);

    var idLght = charIDToTypeID ("Lght");

    desc53.putInteger (idLght, magenta [2]);

    var idHsttwo = charIDToTypeID ("TVH2");

    list3.putObject (idHsttwo, desc53);

    desc47.putList (idAdjs, list3);

    var idHStr = charIDToTypeID ("HStr");

    desc46.putObject (idT, idHStr, desc47);

    executeAction (idsetd, desc46, DialogModes.NO);

    };

  • How field map to Excel in the business model layer

    Hello

    I have a requirement to display the client state of fact for recevied numbers tables on excel file.

    I have a connection pool in place that points to the Oracle database that has a customer dimension and facts related to the customer dimension.

    I now imported an Excel with customer number in the physical layer which has created another pool of connections. The number of records also indicates the correct number

    My question is how the number of customer from excel are mapped to the customer dimension and its related facts is already in the business layer.

    Any idea here will be very useful.

    Thank you...

    Published by: user2778992 on June 23, 2010 09:11

    user2778992 wrote:
    I tried as suggested however the system is allowing me physical joins with in a data only connection.

    What exactly does it say when you try this? "A comparison is done between the incompatible types" or something different?

    I just joined a CSV file into a table in my local DB Oracle without any problems at all. Once you sort this point you will be able to model the MDB layer, as you wish.

  • How to read a counter value for the separation of the two edge before meter is stopped by the second edge (6602 Council)?

    I use a timer/counter with DAQmx 6602. I use the separation of two - available via DAQmx cash edge. Count between the two edges works properly, however I do not know how to read the value of the counter during the counting operation (i.e. after the first edge triggered the beginning of the count, but before the second edge triggered the end of the counting). I'll have to wait for the second goes off the edge of the end of the countdown until I can get a counter value. I need to be able to access the current value of the County during the count operation. This was possible in traditional DAQ. How can it be accomplished using DAQmx?

    Ah shoot - I was afraid that this might be the case (for what it's worth, my series of X returned intermediate values, but the material and the underlying driver are quite different)...

    You just need to take one measure at a time or you are buffer several measures of separation of the two edges at the same time?  So just to take one measure at a time, you can set a task of edges of count using the database internal time as the source using an arm start trigger (first edge) and a sample of clock (second Board) to work around the problem.

    Best regards

  • How to count the values in row

    Hello

    50 columns in a table are and 10 records are there. In these 10 records are not inserted not all columns (some are null values). How to find the values of The Count of Record (row).

    For example

    Table
    P1 p2 p3 p4 p5 p6 p7 p8 p9 p10...

    10 20 30 40 50
    20 30
    60 80



    In the table below - before, how to find
    the number of values in 1 record is 5
    the number of values in 2nd record is 2
    the number of values in 3rd record is 2




    --
    Thank you and best regards,
    Hari
    decode(p1,null,0,1)+
    decode(p2,null,0,1)+
    decode(p3,null,0,1)+
    ...
    

Maybe you are looking for