Sort order column with a between filter

Hi all,
[using OBI-EE version 10.1.3.3.1]
I've got a column 'BLOCK_ROW' which contains values A,B,C....AA,AB,AC...BA,BB...FK,FL
Alphabetically this orders A,AA,AB.... which is incorrect. The order should be A,B,C...
To be able to sort correctly we added a column 'ROW_SORT' to our model, which is numeric. This column is set as the 'sort order column' in the repository and makes sure the sorting is done correctly.
So far, so good...
Now, I want to be able to use a 'between' filter on this column, e.g. between 'A' and 'C'. Unfortunately this returns A,B,C,AA,AB... while I want it to return A,B,C.
Is this possible?
Thanks,
Elio
Generated SQL:
select distinct T91353.BLOCK_ROW as c1,
T91353.ROW_SORT as c2
from
<table_name> T91353
where ( T91353.BLOCK_ROW between 'A' and 'C' )
order by c2
--> Sorting handled based on ROW_SORT, between filter not :(

That will only do the trick in this particular example. Between 'A' and 'AA' will fail again and only returns A and AA while it should return A..Z and AA.
Using extra filters is always possible but I'm looking for a more robust solution, which also allows for dashboard 'between' prompts based on this column.
A workaround I came up with is to add a calculated field which concats an '_' in front of the single 'digit' values. This results in: A,B,_C,.....,AA,AB....FL. This set can be ordered alphabetically and this will work for now.
In the future, however, it might happen that the order of the letters will completely change. In the datamodel this can be achieved by changing the order of the numbers in ROW_SORT.
Example dataset:
BLOCK_ROW | ROW_SORT
Q | 1
D | 2
F | 3
AA | 4
A | 5
The filter 'between D and AA' should then result in D,F,AA.
Any suggestions?
Thanks,
Elio

Similar Messages

  • 'Sort order column' doesn't work for prompt with function

    I turned on the 'sort order column property' in repository for a logic column 'school year', so when I get school year from prompt, it shows desc order. It works fine if th colume in prompt is a simple prompt. But when I add function in the column in prompt (means edit Fx with a case statement), when school year prompt shows in dashboard, it is not sorted in desc order any more, it went back to acs.
    Am I missing something, or this is a bug?
    Another question, when I turn on 'sort order column property' in repository for a logic column, can I choose to desc on another column? I couldn't do it, and had to create another sorting column.
    Thanks,
    Amy

    Cant you create this logic in the rpd and then apply order there and use the newly created column in your prompt..

  • Sort Order Column not Working

    I have set a sort order column on one of A VARCHAR field, but the functionality is not working. The sorting is enabled in the table view and when I sort by the said column it still sorts based on the VARCHAR values of the column instead of the other INT column I want to sort by. The logical SQL and physical query never even includes the column to sort. Are there any exceptions for the 'Sort Order Column' setting? Is there a config setting or data connections setting that I need to check to make this work?
    Thank You!
    Edited by: VNC on Oct 3, 2011 9:08 AM

    hi,
    can you give me more detailes like some sample column data like below kind
    Like Ex: varchar month column it sould display based on month id
    month : Fev-2011,Dec-2011,jan-2011 and month id 1 to 12
    set your month id as sort order column of month name.
    double click month name ->In general tab set the sort order column as month id
    FYI...see the sample link
    http://www.biconsultinggroup.com/obiee-tips-and-tricks/setting-a-sort-order-column.html
    i hope helped you
    THanks
    Deva
    Edited by: Devarasu on Oct 4, 2011 12:39 AM

  • Sorting on columns with templated Report -- Named Column (row template)

    Hi forum,
    I'm trying to duplicate a regular report's column sorting functionality in a "Named Column" report.
    The column headers are in the "Before first and after last row text" "Before Rows" area of the template :
    <th onClick="sortByColumn('#REGION_ID#',5)">Frequency</th>invoking this javascript:
    function sortByColumn(regionId,colNo) {
         var u = "f?p=124:401:&SESSION.:fsp_sort_" + colNo + "::RP&fsp_region_id="+regionId.substring(1);
           document.location.href=u;
    }I'd like to sort descending when a user clicks the column again, and to display the column sort arrows (up/down).
    However, since sorting is persisted per user, even when the page's cache is cleared, it would be necessary to pick up the sort column and order (ascending,descending) on page load or query it later using ajax, so that the sort display (the arrows) stays in synch with the actual sort.
    Has anyone got an idea how to do this?
    Cheers
    Edited by: YT on Apr 1, 2009 4:19 PM
    Edited by: YT on Apr 1, 2009 4:24 PM
    Edited by: YT on Apr 1, 2009 4:26 PM

    Hi,
    Sort ordering on reports are stored as user preferences - see Need to do column SORTING only when I click the column heading for Denes' example on how to use this
    Andy

  • Hyperion Planning- Account dimension - Sort Order Issue with ODI 11.1.1.5

    Hello Experts,
    First of all, I thank you everybody in this forum for posting their valuable suggestions.
    I am facing a strange issue with ODI (Version 11.1.1.5) while loading metadata to Planning ACCOUNT dimension (Version 11.1.2.x). I am using a Oracle view to load metadata to this dimension. I have defined the sort order in the view and enabled SORT_ORDER_BY_INPUT. For the fresh load to the dimension, everything is working fine. But, when I move a member from one parent to another parent, and define it as the top member of new parent, it is missing its sort order.
    But it is working fine if you define it as the second, third...or last member under new parent. I have tried all the possible ways by flipping all the properties but unable to fix it.
    Please help me here to resolve this issue.
    Your help is greatly appreciated!!
    Thanks
    Edited by: user11965311 on Sep 20, 2011 7:07 PM

    To be honest I think you are best logging it with Oracle because it sounds like you are doing everything correctly so it could be a bug.
    Have you tested this on any previous versions of ODI or is it a new installation?
    If it does get logged with Oracle please keep me informed of the outcome as I would be interested to hear.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Sorting JTable column with DefaultTableModel

    Hi all,
    can i sort the column in Jtable which is using the DefaultTableModel? If can, how? I have downlaad the TableSorter.java and implement it into my code which is using DefaultTablemodel, but it doesn't work... :(
    If sort does not work with the DefaultTableModel, which model should i use that will list the records in the JTable and sort it?
    Thanks in advance for yr help...

    When you create your own table model you usually extend the AbstractTableModel class, and the DefaultTableModel class does just the same.
    So I think your problem is likely to be due to the sorter class itself, rather than the model.
    I hope this will help you.
    Bye

  • Sort order column in a report

    hi all,
    I've seen in a dashboard (OBIEE 10.1.3) on linux os that is possible to sort the columns of the measures in a table (an arrow appears next to the name of the column), but I haven't noticed in the settings how get this result.
    is a feature of linux or you can apply this in windows? if so, how?
    thank you for the reply

    you have to enable the sorting for table view in Answers report. refer below article.
    http://gerardnico.com/wiki/dat/obiee/dashboard_column_sorting
    - Madan

  • Between-Filter on Column using calculated presentation-variable values

    Hello everyone,
    i'd like to know whether it is possible to filter a column with a Between-Statement using two calculations done on a single presentation variable in Oracle BI Answers
    What i have:
    - OBIEE 10g
    A line-chart, which shows earnings over a period of several years: In 1999 it might be 100.000€, in 2000 it might be 80.000€,..., in 2009 it might be 95.000€ and so on.
    What i want:
    Now i'd like to create a dashboard prompt to be able to choose a certain year, for example 2006.
    The chart then should show data for the year given (2006...) and two years before(2004, 2005) and two years after the chosen year(2007,2008).
    Example:
    If 2006 is chosen, then data from 2004 to 2008 should be shown in the chart
    If 2000 is chosen, then data from 1998 to 2002 should be shown in the chart.
    What i did:
    - I created the Prompt, set its presentation variable to var_year.
    - I then created a filter on my years-column, choosing "Between" from the DropDown-List.
    - I added two 'Variable-fields within the filter-dialogue', each filled with var_year and a default value.
    - I tried to add a +2 or -2 to the variable-expression field, but (ofcourse) got an error.
    Thanks in Advance and greetings from Germany,
    Chris
    Edited by: user12288481 on 04.08.2010 13:18

    Sorry for not answering to your Posts yesterday.
    I have to admit that i was unable to solve my problem, although the solutions posted, seemed to be quite promising.
    Hammett81's solution
    First, I gave Hammett81's solution a try and created a filter group using the 'Add filter' option/dialogue box.
    This Filtergroup consists of 5 single filter expressions, which have been connected by ORs:
    The way i created those filters:
    In the 'Create/ Edit Filter' i've chosen 'is equal/ is in' - Operator.
    Then i was given the chance to add a 'value' or to add 'Variable --> Presentation', which summons 2 textboxes (Variable Expression and Default)
    Everything i put into the variable expression field will be put into the @{} bracket by OBIEE, after clicking ok.
    So it is not possible to use +1, +2, -1,-2 etc. within this field, as this would lead to @{var_year +2} for example, which ofcourse does not match the presentation variable's name.
    On the other hand, if i do not use a Variable Expression but a "Value field", then i can write @{var_year} +2 for example.
    In my opinion, obiee wants to use the expression as a simple value though, rather than use it as a variable and therefore won't check the presentation variables value, when it tries to filter the data.
    John's solution
    Regarding Johns answer, i am not sure where to put the filter expression. Should this be added into the SQL-Query (Advanced-Tab) or do i have to add it within the columns formula? (fx)
    Edited by: Chris2010 on 05.08.2010 09:36

  • Achieving chronological sort on a date column with month function

    Hello all ,
    I have a a date column(start_date) on which I applied 'MONTHNAME' function to extract the month name
    out of the date . i.e. 4/24/2013 will return 'Apr' .
    While trying to achieve a sort on this , its returning alphabetical sorting , i.e.
    aug , apr , dec , jul ,jun etc .
    So achieving a chronological order , I created a logical column 'sort_month' . In the expression section,
    I wrote , month(start_date) . so this return numeric values of months , i.e . 1,2,3, 4 etc.
    Now , in 'start_date' column properties i have selected this 'sort_month' column ,
    sort on column . So , this should add a chronological sorting order to start_date column ?
    well its not working !
    Am I missing anything here ?

    Logical column general properties and set 'sort order column' to months
    Edited by: Srini VEERAVALLI on Apr 23, 2013 1:55 PM

  • Genre sort in Browser, auto sync, sort order

    I just updated to 3.1.1 and iTunes 9.0. Now Genre is missing in the browser. How can I get it back? Also none of my playlist sync in auto. I have to manually manage it. I rarely use it for music, just for listening to stories and podcasts, so it's important to have them in the correct order for listening, i.e. chapters. Now the playlist doesn't show up on the itouch sorted correctly.
    1. Doesn't have Genre in Browser. 2. Doesn't auto sync. 3. Sort order is messed up between iTunes and iTouch. 4. Is it caused by 3.1.1 or iTunes 9.0? Does anyone know how to fix these issues? I don't have an old download of iTunes 8 to uninstall 9 and reinstall 8. iTouch 3.1.1 can't be uninstalled. Shadow

    shadow1953 wrote:
    1. Doesn't have Genre in Browser.
    iTunes 9 changed the browser to a column on the left side (by default), but you can go back to how it was on top, see the View/Column Browser menu. You can have multiple filters (Artist, Album, Composer, etc.) either as a column on the left, or across the top.
    shadow1953 wrote:
    2. Doesn't auto sync.
    You have to be doing something wrong since auto-sync does work. Make sure your iPod is in auto-sync mode -- if you change the sync mode, make sure you click the "Apply" button -- if you don't, it won't change. If you're not syncing your entire library, then make sure that you've selected the playlists you want loaded onto the Touch.
    shadow1953 wrote:
    3. Sort order is messed up between iTunes and iTouch.
    Are you referring to the sort order within a playlist, or the sort order of all your playlist names? I know that the playlist name sorting has changed (again) such that punctuaion comes first, then letters, then numbers. If you're referring to the sort order of the items within a playlist, then it may be a bug -- there are reports of problems with the sorting of podcasts within playlists, so maybe the same is true for books?
    shadow1953 wrote:
    4. Is it caused by 3.1.1 or iTunes 9.0? Does anyone know how to fix these issues?
    Not sure, could be either.
    shadow1953 wrote:
    I don't have an old download of iTunes 8 to uninstall 9 and reinstall 8. iTouch 3.1.1 can't be uninstalled.
    You can get down-rev versions of iTunes at sites like filehippo (there are others). Keep in mind though that your "iTunes Library.itl" file was changed with iTunes 9 and is not backward-compatible. You'll have to look for the old .itl file in your "Previous iTunes Libraries" folder (check the date of these .itl files). If you fid the .itl file from iTunes 8, just replace the current one and then uninstall iTunes as well as "Apple Mobile Device Services" and Quicktime, then install iTunes 8.
    You can go back to a prior OS version on your Touch if you have the native file (you would if you previously did a firmware update, it stays on your computer). If you updated to 3.0 then you can go back to it by holding the SHIFT key as you click the Restore button (use the OPT key on a Mac) and then select the 3.0 version. You can't go back to 2.x in this manner, but there is a different way to go back to 2.x if you ever want to (won't go into that here).

  • Sort Order for SAPDBPNPCE

    Hello all,
    using the Program SAPDBPNP to select the logical database PNP you have a button called sort order. With the new logical database PNPCE you do not!
    Anyone knows how to sort tze result using the SAPDBPNPCE?
    regards,
    Markus

    Hi Markus,
    No, the Sort Order has not been removed in  PNPCE.. which report are you using? If it is tied to the Report Category PNPCE, the Sort Order icon is displayed 4th from the left on the tool bar.. You can alos use the CTRL + F1 keys option.
    Regards,
    Suresh Datti

  • Different sort order with line chart and stacked column chart

    Hi,
    I have a problem with sorting within flash charts.
    The chart should be ordered by a date column.
    If I'm using a line chart everything is fine. The columns in the chart are in the same order as returned by the query.
    If I change the chart type to stacked column chart, I get a wrong order.
    It is orderd like 5, 6, 7, 8, 9, 10, 1, 2, 3, 4.
    What's wrong?
    Here the query i use:
    SELECT NULL AS link,
    TO_CHAR (zeitpunkt, 'dd.mm.yyyy'),
    MAX (DECODE (db_sid, 'TI06E', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "TI06E",
    MAX (DECODE (db_sid, 'TI06T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "TI06T",
    MAX (DECODE (db_sid, 'TI14S', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "TI14S",
    MAX (DECODE (db_sid, 'TI14T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "TI14T",
    MAX (DECODE (db_sid, 'TI16T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "TI16T",
    MAX (DECODE (db_sid, 'TI24K', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "TI24K",
    MAX (DECODE (db_sid, 'TI33T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "TI33T",
    MAX (DECODE (db_sid, 'WF03E', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF03E",
    MAX (DECODE (db_sid, 'WF03K', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF03K",
    MAX (DECODE (db_sid, 'WF03T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF03T",
    MAX (DECODE (db_sid, 'WF05K', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF05K",
    MAX (DECODE (db_sid, 'WF05T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF05T",
    MAX (DECODE (db_sid, 'WF06T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF06T",
    MAX (DECODE (db_sid, 'WF07K', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF07K",
    MAX (DECODE (db_sid, 'WF07T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF07T",
    MAX (DECODE (db_sid, 'WF08K', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF08K",
    MAX (DECODE (db_sid, 'WF08T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF08T",
    MAX (DECODE (db_sid, 'WF09K', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF09K",
    MAX (DECODE (db_sid, 'WF09T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF09T",
    MAX (DECODE (db_sid, 'WF10K', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF10K",
    MAX (DECODE (db_sid, 'WF10T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WF10T",
    MAX (DECODE (db_sid, 'WG04T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WG04T",
    MAX (DECODE (db_sid, 'WT05T', VALUE, NULL)) OVER (PARTITION BY zeitpunkt) AS "WT05T"
    FROM db_performance_temp
    ORDER BY zeitpunkt ASC
    SQL> desc db_performance_temp
    Name Null? Typ
    ZEITPUNKT DATE
    DB_SID VARCHAR2(30)
    VALUE NUMBER

    I found the solution.
    Anychart seems to have a problem with null values!
    The corrupted sorting only occured for a specific set of search criteria and a specific day. At this day some values have been null.
    I added a "nvl( [...], 0) for every value.
    No I get a correct sort order.

  • Can I transfer my hand made album sequence (sort order) defined in element when I turn a local album into a mobile album used with IPAD. Or do I have to change the dates artificially?

    Can I transfer my hand made album sequence (sort order) defined in elemenst when I turn a local album into a mobile album used with IPAD. Or do I have to change the dates artificially?

    Andrew, I know I am extremely late to the party but I too use Grid View.  I had the same problem that you had but have found this to work for me.  I used it and it is still holding as my default sorting even after switching between the Artist page and Grid View.
    Once you are inside of the Artist page continue to click on the Album column until it shows Album by Artist/Year.
    That will give you each album sorted by the year instead of it randomly sorting it for you each time you leave an Artist's page and then back again.
    Hope this helps.

  • Sort Order of Lookup Column

    I have a list with look-up columns. 
    In particular, 'Market' is a look-up column, pulling the 'Title' column from a document library.
    The issue I have is that the 'Market' look-up column contents are not listed in alphabetical order when selecting the menu to sort/filter, however, they are in alphabetical order
    in the library they are being pulled from.... 
    What controls the sort behavior of look-up column contents?
    UPDATE: I have discovered that, by grouping the View by any column, the error disappears. Although this might be a work-around and provide context to an eventual solution, this is not a solution. 
    UPDATE 2: The key seems to be multi-value columns OR System Column (TYPE), require grouping to display sort order correctly. 
    Filtering by the type column (Type = xls ~ 7 items) does
    NOT resolve the issue 
    Filtering by the type column (Type = xls ~ 7 items)
    AND Grouping by
    single-value lookup column (Year = 2012 ~4 items) does resolve the issue.
    Filtering by a single-value lookup column  (Year = 2012 ~ 1001 items) does resolve the issue 
    Filtering by a multi-value lookup column (Sector = Residential ~ 418 items) does
    NOT resolve the issue
    Filtering by a multi-value lookup column (Sector = Residential ~ 418 items)
    AND Grouping by
    single-value lookup column (Year = 2010 ~96 items) does resolve the issue.
    - Rick

    Here is a way that worked for me.  I had a lookup column from a list to a document library.  When I opened the form up it sorted by title.  I created a new Data Connection in Infopath editing the list.  When I created the Data connection
    it gave me options which fields in the data connection and the ability to sort based on a field.  I then just pointed my drop down list to point to the new data connection.  This worked on ipad as well as IE9.  No code required and my google
    searching did not find this simple solution so putting here.

  • How to order an entire Report by a column with in a group...

    Okay, I have a Group Above report, and I want to order the groupings by a column within the group. I am using a lexical parameter in place of the entire ORDER BY statement in the query, giving the user the capability to sort the report by any specific column, at runtime.
    So, basically, this parameter allows for the ORDER BY to be dynamic; however, in the Data Model, I am required to designate at least one hard-coded break column, which overrides whatever column is designated by the user at runtime.
    Any ideas how I can get around this?

    Hi Brice,
    If you want just i single hard coded column in a group
    then i think you can create summary column with counting
    so you can say say a column that gives you just Serial no.
    and rest of the thing as it is.
    in this way you got your hard column and also Order by facility
    that you want.
    Hope that helps you.
    Enjoy Oracle....

Maybe you are looking for

  • S-Video Out Changed? Looks Bad

    Trying 10.5.1 booting off external drive with a PowerBook 17inch, G4 1.0, 1gig ram with nVidia GeForce4 MX graphics card. Using the S-Video out to my Plasma TV looks very interlaced, like bad anti-ailsing, can't read anything in the top menu bar. Whe

  • [Solved] Use of getOption in a getSrcTablesList call

    Hi gurus, I'm rewriting a LKM to retrieve data from Oracle to Oracle through an existing dblink without creating a view on the source. I want to pass the name of my dblink in the getSrcTablesList call by using an option of the LKM but the call to get

  • Drop down in the field Requisitioner

    Hi Friends, Right now i am working on SAP 6.0 Version. We are maintain the list of Requisitioner in this programe (ZMMAFNAM). Now I want to give drop down facility in the field Requisitioner for the transction like ME51N, ME21N.... Please give me the

  • How to invoke a 6 parameter java class within jsp

    i have just begun to learned jsp and java recently, so have the question below: Situation: My boss asked me to do a project for doing online data mining. He requested the thing below: 1. Write a webpage by jsp with some textfield or pull down meun to

  • Reverse engineering a Favourite script

    Hi, My workstation has recently been upgraded and I am now using CS5.5. Before this I was using CS3 and had a number of favourite scripts to which short-cuts were assigned. There was a particular script for a normalise process that had about three st