In fact, rank the table?

Hello guys

I need to advise the guys

example: I have a table called "FS_DPK_Rank"


Here's the table looks like:

fact table.png

and the report will be like this:

fact table 2.png

where the amount of the balance will be SUM by product and TOP 2 is like TopN by CIF No. (overall TopN)

but there is condition: when the user choose Office then function TopN will adjust according to the offices.

I'm really confused how to solve this situation.really need suggestions, advises and solutions.with respectfully

Hello

I tried your script on my local machine and was able to realize your condition in a different way. Below is the set of data that I tried. I'll post here if I find another solution.

Final result

Monthly activity - SUM ('made activity'. "" activities "by"Time ". ("" Month ")

(Top 2) sum - SUM ((CASE WHEN RANG (« activité faits"." nombre d'activités» par «Time».))) ("" Month ")<3 then="" "activity="" facts"."#="" of="" activities"="" else="" 0="" end)="" by="">

In your case, replace "Time". "" Months "of the grouping column. Also in the example above I gave the rank directly. Replace it with a CASE statement according to your requirement. Also place the CIF No. in the analysis and then exclude this column in the tabular presentation.

Suppose you have model RPD in place for this table.

Tags: Business Intelligence

Similar Questions

  • Addition of high rank of the question from the table in OFA

    Hi all

    I have a customized page of the OPS with a table area advanced, under whom I add a line event, so when I select the Add button of the line box, I am able to insert a blank line in the table, but it is whenever it inserts the line to the top of the table, but I need the empty line must be added at the end so it is possible to implement this help please me.

    I wrote a method like below in the AM to create a line.

    Public Sub InsertRecord (String p_seq)

    {

    XXXVOImpl vo = getXXXVO1();

    vo.setMaxFetchSize (0);

    Line XXXVORowImpl = (XXXVORowImpl) vo.createRow ();

    row.setAttribute ("xxId", p_seq);

    vo.insertRow (row);

    row.setNewRowState (rank. STATUS_INITIALIZED);

    }

    Thank you

    Hello

    Try using the code below:

    public void InsertRecord (String p_seq) {}

    XXXVOImpl vo = getXXXVO1();

    vo.setMaxFetchSize (0);

    Line XXXVORowImpl = (XXXVORowImpl) vo.createRow ();

    row.setAttribute ("xxId", p_seq);

    VO. Last();

    VO. Next();

    vo.insertRow (row);

    row.setNewRowState (rank. STATUS_INITIALIZED);

    }

    Sushant-

  • Reg: With the help of several tables of facts in the RPD!

    Hi all

    Can I get help with the following scenario?

    We use OBIEE 11 g.
    We have a report that uses 1 single fact table to retrieve data and it must be hell a lot of time to display the data in the report.

    My question is is there a way to show the performance of the report if divide us the data in table 1 to 2 fact tables and the report uses them 2 made tables.
    Are there other ways of finalization of the report for better performance.

    Thanks for the help in advance!

    Ajay.

    Hi Ajay,

    Follow these steps for tuning;
    1. try to adjust the SQL query generated first by the report, and then make the necessary changes. (Put index on the column that is required so that your query is scanning the index instead of the whole table)

    2. you can try to create the agg fact table and use agg navigation to improve performance. (This is to reduce the data set on which sql is triggered)

    3. you can try to create partitions on the table of FACTS in the comic book, and so held the partitions are queried according to the filters.

    4. in the last if all the foregoing does not resolve your query, you can try to divide the FACT table in two or more depending on your decision and then use fragmentation content in the MDB of the RPD layer if it will strike appropriate tables depending on whether you declare.

    Mark Correct/utile so this can help.

    Good luck
    Kashi

  • Select at least 1 rank, even if the table is empty

    Hi all

    I've got table t1:
    with t1 as (
    select 1 as column1, 't' as column2 from dual
    )
    select * from t1 
    My need is to select at least 1 rank, even if the table is empty, for example:
    with t1 as (
    select 1 as column1, 't' as column2 from dual
    )
    select * from t1 where rownum = 0
    union all 
    select 0 as column1, '' as column2 from dual
    The problem is that I don't know the amount of columns and its data type. How can I make a dynamic query based on the current structure of table t1?

    Hello

    This looks like a job for an outer join:

    SELECT  t1.*
    FROM            dual
    LEFT OUTER JOIN t1    ON  1 = 1
    ;
    

    Because it is not reference individual columns from t1, you do not need to know what are the columns it, or what their data types.

  • changing the table of facts in environmental impact assessment

    Hello

    I have added a new dimension to a fact table and created a new model of environmental impact assessment and the metaoutline. I would now change the fact table to match production. I changed it to sql and I'd like to be reflected in the model, but I don't see how. I prefer not to recreate the model. I don't want to lose the metaoutline or can associate you with another model?

    I hardly use HIA and would appreciate some guidace.

    Thank you

    Nathan

    No change of name he is going to be a problem, to do that you should drag the 'new' object in your model and remap it.

    For what it's worth, as a best practice, I always run my models to views in a relational database with generic names. So, I have a view called Fact_Table. If ever, then I remodel, I can modify the tables and update the definition of the view. Then in the OLAP model all I have to do is add or remove columns, but the object allows you to stay in touch.

  • Drag the tables, odd and even rank-background color?

    How can I set the background color of line of odd and even rows? in adf dragged table

    line 1-white

    line 2-black

    line 3-white

    line 4-black

    Always mention jdev version.

    See this post: line alternative color in the table of the ADF

    Dario

  • Get the rank of the table selected in DialogOKAction

    I use JDeveloper 11.1.1.6

    In my example, I have a page fragment that includes a table reading with the button 'Add Row '. When the user clicks on the button 'Add Row', the following will occur:
    1. create the insertion occurs. The KP for this table is generated DB so that it is marked as not necessary in my model.
    2. a popup in windw dialogue form is created asking required data and not need to be completed.

    Now the user enters data and click on the OK button. The OK button calls a method that does the following.
    1 validates the data user and if OK we continue on another that I have send a message to the user to correct the data.
    2. the new line is posted. I must do this so that I can I hope to add value to the PK that is not created by the DB until the validation.

    I have 2 questions:
    1. I need to get this PK value so that I can write a record in a table of audit and also do something else with this value. I can't get that to work.
    2. After all other work, I want to return to the table with the new selected line. I can't get that to work either.


    I have attached the portion of my method in question below this 2 issues. 3 fault code lines are in bold. Could you please provide guidance as what I might want to try.






    BindingContainer lBindings = getBindings();

    now, I'm doing some validation before committing

    Validation of new line... must start now because the primary key is generated DB
    OperationBinding = lOperationBinding
    lBindings.getOperationBinding ("Commit");
    Object lResult = lOperationBinding.execute ();

    Download the new line
    DCIteratorBinding = lIteratorBindings
    (DCIteratorBinding) lBindings.get ("myTable1Iterator");
    ViewObject lVO = lIteratorBindings.getViewObject ();
    VORowImpl Lrowrequired = (VORowImpl) lVO.getCurrentRow ();

    Create and insert the Audit record
    RowIterator lAuditIterator = lRow.getAudit ();
    AuditVORowImpl = lAuditRow
    (AuditVORowImpl) lAuditIterator.createRow ();
    lAuditRow.setId (lRow.getId ()); _*
    set the other fields on the lAuditRow

    Validate the new line of verification
    lOperationBinding = lBindings.getOperationBinding ("Commit");
    lResult = lOperationBinding.execute ();

    refresh the VO
    DCIteratorBinding = lDciter
    (DCIteratorBinding) lBindings.get ("myTable1Iterator");
    Key lCurrentKey = lDciter.getCurrentRow () .getKey (); _*
    lDciter.executeQuery ();

    Define the new line created as the selected line in the table during update
    lDciter.setCurrentRowWithKey (lCurrentKey.toStringFormat (true)); _*

    refresh the page fragment "store Group view.
    AdfFacesContext.getCurrentInstance () .addPartialTarget (this.getTable ());

    User,
    I see two possible things to try.
    1. check the entity behind the new line and make the key attribute "update after inserting" to ensure that you get the key based on the sex of the db.
    2 use a sequence of db and you get the key before inserting the row into the db. Then you know the key.

    One last thing, you should check for errors after executing an operation...

    Timo

  • Rank of coloring in the table - small helps

    Hi, I tried ti Display the table in two colours alternately.

    There is a group of straight. After the grouping clause... I put a condition that says:

    < xsl: choose >

    < xsl: When test = "position () mod 2 = 0" >

    < xsl: attribute name = 'background-color' xdofo:ctx = 'incontext' > Rose < / xsl: attribute >

    < / xsl: When >

    < xsl: otherwise >

    < xsl: attribute name = 'background-color' xdofo:ctx = 'incontext' > orange < / xsl: attribute >

    < / xsl: otherwise >

    < / xsl: choose >


    But, I could see only this particular cell where I put the condition, this cell unique coloring alternately (first cell) instead of the whole line.

    You can use several if conditions like this.

    Red
    Yellow

    Or you can have a default background color and under certain conditions apply other color.

  • SD3.0 EA3: ER model - Classification Type in the Table Properties window

    Hello

    In my ER model, for some tables in my model, I am not able to use the Type of Classification. When I select a classification type and click on the button apply the fist type classification letter appears on the header of the table. But the format of classification does not apply. For example, I created a new type of classification 'Story' and given a red background color. When I apply this type of ranking on a table the letter "H" appears on the header color but background of red table has not been applied. Table is always to have default yellow background.
    This behavior is identical, even if I select a Classification type predefined as fact or Dimension etc... And this behavior is for a few tables only. For other paintings his worksheet.
    I'm not able to identify any particular difference between these tables.

    Please help me.


    Thank you
    Rahul

    Published by: user10986679 on January 24, 2011 12:04

    Rahul,

    can you check the settings for 'format' for tables without own colouring - it's "Format" in the menu of items on the diagram - 'Use the default color' should be selected. If it is not selected, then using the specific defined on the object and color associated with type of ranking is not applied.
    Select all objects (can use CTRl-A) and "format" dialog box allows to define the use of the default color.

    Philippe

  • Display the contents of the Table

    Hello

    I must show the following table in a page of dashboard with the lines as shown below. The content of the first column is the details of the measure and the second column is the actual value.

    1st row: Total revenues for the current year $12 150 000
    row 2: total expenditures for the year current $11,110,000
    rank 3: number of employees in the Organization 35
    rank 4: Attrition rates for the current 3% year

    How can I show this because
    1. each row comes from a different set of fact and dimension tables
    2. each value in the second column (i.e. measure) should point to a unique url. Here when the user clicks on a $12 150 000, she must take the user to a url and clicking on $11,110,000, it must take him to a different url.

    All suggestions are apprectiated.

    Thanks in advance

    Create a report that contains at least 4 columns you need. (fi c1, c2, c3, c4)
    Create a narrative view:
    Total revenues for the current year <.a href="url">@1<.>[br]
    Total spending for the year <.a href="url">@2<.>[br]
    Number of employees in the organization <.a href="url">@3<.>[br]
    Rate of attrition for the year <.a href="url">@4<.>[br]

    Replace the<. with="">

    What about John

    http://obiee101.blogspot.com/

    Published by: John Minkjan, January 15, 2009 22:59

  • How to keep the tables in mode fixed?

    Don't know about you but I'm not used to the fact that available in many 3.5.3. moves horizontally and vertically. It distracts me a lot, especially with the touchpad on my Macbook Pro. Is there a way to get rid of this automatic void of white on the sides and bottom. If the table is small, there is no need to make "wobbly", don't you think?

    Someone at - it an idea?

    Hi BassPlaya,

    I think that what you are wanting to do is to reduce the size of the painting that arrays of numbers are sitting on.

    As I know there is no way to do. You can drag the table upwards and to the left, but do not stop when the yellow guides appear or hide you the first lines/colomns and be unable to view/edit the.

    I found this problem bothers me is no longer on the Mac-I set my scroll automatically.

    Quinn

  • How to remove columns from the table on the master 1-0?

    I have an array of 96 columns with strings. I also have the array of int 96-elemets (mask) with 1 and 0.

    What I want to do is to is to remove (or hide - but I read that it is not possible) all the columns with index corresponding to 0 in the mask table.

    example:

    columns in the table

    1 2 3 4 5

    mask

    0 1 0 0 1

    I want to remove the columns 1, 3 and 4 and leave only 2 and 5 in my table.

    How can I do?

    If I create loop for with i as the index of the column, when I do DeleteTableColumns() columns number decreases, and I get an error of range out of

    Or do I have an option to hide the unnecessary columns (not set their width to 1, it's very ugly-looking)?

    Please help me (())

    Hello rovnyart!

    1. removal of columns in the table:

    I suspect that the reason why you get the out-of-range error is due to fact that in your loop, you delete the columns in the table, you'll eventually end up by referring to a column that no longer exists, because the other columns before it have been deleted. While you remove each column of your table in the loop for example, the column index number will move, because you deleted the other columns in front of her.

    To resolve this, even if you delete a column in your loop, make sure that you take also into account that the index of the column is moved because of the removed columns.

    2 hide columns in table:

    You can use the ATTR_COLUMN_VISIBLE attribute to hide columns in the table:

    http://forums.NI.com/T5/LabWindows-CVI-idea-exchange/add-attr-column-visible-attribute-for-table-Col...

    http://zone.NI.com/reference/en-XX/help/370051Y-01/CVI/uiref/cviattrcolumnvisible_column/

    3 alternatives:

    Note that another alternative would also use a tree instead, control as the tree control also supports the hidable columns:

    http://forums.NI.com/T5/LabWindows-CVI/table-hide-column/TD-p/569773

    Best regards!

    -Johannes

  • unwanted in the table entry

    Could someone help, I'm stuck in a problem

    Unwanted in her entries in the table.

    In fact I gave provided that above some condition entries to be filled, the control works but when the condition is false

    the table shows 0 for this value, I have to also use the timestamp,

    The vi is attached below

    Hi soundnt,

    Since a previously asked in the post, the real condition, you can do the writing of file and you want to leave the false values, check and write to the file only for the true condition. For the false condition make an action or if you want intimate put a notification logic to that.

    Thanks and greetings

    Sylvie

  • CVI suggested help update on 'programming with the Table controls.

    Hello

    May I suggest adding a sentence to the chapter 'Programming with the Table controls', 'Creation and deletion of cells' section help of CVI.

    After the sentence "use the following functions to control the number of rows in a table control...". "I would like to add a suspicion that the number of lines is also affected by (programmatically) adjustment of the height of the table.

    Now that I've discovered, it's obvious ;-)

    Hi Wolfgang,.

    I think you might be misunderstanding this sentence in aid. It does not refer to the size of the table, in regard to the number of lines go in the table. It is in fact the number of real lines exist in the table. And the total number of rows in the table is absolutely not affected by the height of the table.

    Luis

  • Intertwining of the tables on FPGA

    Hello

    I am trying to interleave 1 3 tables for writing a FIFO DMA on an FPGA, but I can't make it work properly. When I try 2 1 tables it of ok, but with 3 elements are not properly interlaced and the result is that all 1 3 bays are mixed up.

    I tried to use the interleave with 3 entrances and gives the mixed result, and I also tried to striping and striping 2 tables then the 3rd in this table. It works better that at least I get 2 tables properly interlaced, but the 3rd one is missing. For the test I used 3 sine waves each of a different magnitude, but the same frequency, using the input function 3 the result is a sine wave in a sine wave. 2, interlacing and then the 3rd in this table are reflected in three waveforms good but table 2 and 3 are identical.

    According to the help, it is possible to use the interleave on an FPGA at the entrance and the results are tables 1 d, which combines 3 1 the tables should be, I think...?

    I tested the service in a standard vi and it worked fine so the question is of course to the fact it's on an FPGA, but this is because of the FIFO, the function interleave or something else?

    The material is a 7856R if that makes a difference.

    See you soon,.

    Darren.


Maybe you are looking for

  • Scan from HP LaserJet MFP M127fw Pro

    Hello I'm scanning with my MFP HP LaserJet Pro M127fw and when I press 'Apps' he only says: 'connection' and the clock starts to turn and nothing happens. I tried to reinstall the boot with no improvement drive. Can anyone help please? Thank you.

  • Portege R100 - impossible to reinstall my Bluetooth

    I had to reinstall my computer (Toshiba Portege R100) since the factory installation discs and now I can't reinstall my BTI use the SD Card3 with PA3370 part number. My problem seems to be the inabililty to install the SD host upgrade.I downloaded th

  • Lexmark x 1180 bluetooth device

    have a lexmark x 1180 copia machine.keeps on offline all the cheaked time.have firewall.con´t do turn on computor

  • Why windows media player converts songs even if the album already appears on the list of devices?

    Some albums get just copied to the device whenever I sync even if they are already on the list of disks on the device.Some albums never appear on the list of albums on the device...

  • Problem of audio / headphone XPS before 8500

    Hello I got my XPS 8500 about 3 months ago and have been using it without problem since then. However, recently my headphone jack/audio front just stopped working... Im not sure what to do to solve this problem, when I plug my headphones, he does not