Sorting rows and columns in cross-tab

My XML:
<ROWSET>
     <data>
          <R>C</R>
          <C>3</C>
          <V>C3</V>
     </data>
     <data>
          <R>C</R>
          <C>2</C>
          <V>C2</V>
     </data>
     <data>
          <R>B</R>
          <C>1</C>
          <V>B1</V>
     </data>
     <data>
          <R>B</R>
          <C>3</C>
          <V>B3</V>
     </data>
     <data>
          <R>A</R>
          <C>2</C>
          <V>A2</V>
     </data>
     <data>
          <R>A</R>
          <C>3</C>
          <V>A3</V>
     </data>
</ROWSET>With the help of the Wizard, I created the following corss-tab (table 2x2)
(1,1) RC
(1,2) <?for-each-group@column:data;./C?> <?C?> <?end for-each-group?>
(2,1) <?for-each-group:data;./R?><?variable@incontext:G1;current-group()?><?R?>
(2,2) <?for-each-group@cell://data;./C?><? ($G1[(./C=current()/C)]/V)?> <?end for-each-group?>group?&gt;producing the following output:
RC     3      2      1
C      C3     C2
B      B3            B1
A      A3     A2
-------------------------I need the same output, just with the rows/columns properly ordered. Please help. Thanks.

Hi,
with this code
cell(1,2): &lt;?for-each-group@column:data;./C?&gt; &lt;?sort:C?&gt; &lt;?C?&gt; &lt;?end for-each-group?&gt;
cell(2,1): &lt;?for-each-group:data;./R?&gt;&lt;?sort:R?&gt;&lt;?variable@incontext:G1;current-group()?&gt;&lt;?R?&gt;
cell(2,2): &lt;?for-each-group@cell://data;./C?&gt;&lt;?sort:C?&gt;&lt;? ($G1_SQUAREBRACKET_(./C=current()/C)]/V)?&gt; &lt;?end for-each-group?&gt;
and your data I get
.....|.. 1..|...2...|...3
A.............. A2......A3
B......B1...............B3
C...............C2......C3
Regards
Rainer

Similar Messages

  • Conditional Formating of rows and columns in template(cross tab)

    Hi,
    I am developing a cross tab report in which I have row header as the year like 2008,2007,2006....column header as months jan,feb,mar...and the data area contains the respective data...I need to format the background color of the rows and columns which are below the date of the report(report is ran for a particular month like mar-08)..I was able to format the background color of all the rows that fall below(ex:08) the year of the report(using <?if@row:row_name<'$first'?> <xsl::attribute name="background-color" xdofo:ctx="incontext">#C0D27F</xsl::attribute><?end if?>)..
    and I need to format the 3(till march) columns in the yr 2008
    Thanks...

    Hello..
    Thanks for the reply...
    I have report date as mm|yyyy...below is a sample data of the cross tab..
    <Q1>
    <REPORT_DATE>04|2005</REPORT_DATE>
    </Q1>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>1.32</NET_ROR>
    <ACTUAL_DATE>01/01/2004</ACTUAL_DATE>
    <FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.21</NET_ROR>
    <ACTUAL_DATE>01/01/2005</ACTUAL_DATE>
    <FUND_FACT_YTD>5.739540457478967975310388578877768035</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>.59</NET_ROR>
    <ACTUAL_DATE>02/01/2004</ACTUAL_DATE>
    <YTD>7.942192987387475647074276803933198866</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>1</NET_ROR>
    <ACTUAL_DATE>02/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>0</NET_ROR>
    <ACTUAL_DATE>03/01/2004</ACTUAL_DATE>
    <YTD>7.942192987387475647074276803933198866</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.2</NET_ROR>
    <ACTUAL_DATE>03/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>-.07</NET_ROR>
    <ACTUAL_DATE>04/01/2004</ACTUAL_DATE>
    <FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.87</NET_ROR>
    <ACTUAL_DATE>04/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    MONTH_BEGIN_DATE goes as the column header, BEGIN_DATE goes as the row header and NET_ROR is the data area..I need to get the background color of each cell of NET_ROR below the report date as one color...
    Thanks ..

  • New tab page rows and columns problem

    Hi.
    After a recent update and making new tab links smaller, I've decided to increase number of rows and columns, put my most frequently used bookmarks in there and close bookmarks toolbar to improve visibility. Since yesterday (March 26 2014.) I lost my bottom row, although there is enough space on my screen. In about:config newtab section, it still says I'm having 6 columns and 5 rows, but I only get 4 rows when I open new tab. What might be the problem, and why did you make those newtab links smaller anyway?

    Hello,
    You're using Nightly, which is a highly experimental version of Firefox intended for testing. In the latest version, modifying the ''browser.newtabpage.columns'' and ''browser.newtabpage.rows'' preferences in about:config behaves as you describe (in my case, I actually only get 3 rows, presumably because of higher DPI settings). This issue has already been reported.
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=988459 Bug 988459 - New-tab-page is not showing the defined number of tiles anymore]
    Please read the Bugzilla etiquette page before deciding to comment on bug reports.
    * https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
    If you don't want to test a cutting edge version of Firefox and report issues with it, switch to the release version.
    * http://www.mozilla.org/firefox/all/

  • Localization of CrossTab row and column label Crystal Report RPT file

    Dear all,
    Does anyone know how to support multiple locale texts (English and French) in CrossTab Row and Column Header labels and grand total labels? Is there a way to parameterize text objects CrossTab in one single Crystal Report RPT file to use some sort of locale resource file containing text string for different languages based on the users of RPT at runtime? The idea is to use one single RPT file to generate report for different locale text for CrossTab Row and Column abels and grand total labels  instead of creating RPT files per locale?

    Hi,
    Does the database have a column that identifies the language? If it does, then you could create two separate cross-tabs and place them in different sections and conditionally suppress the section depending on the language from the database.
    That's the only thing that can be done in my opinion.
    -Abhilash

  • How to preserve a row and column in numbers automatically.ie the cells are not consecutivecell a1 a3 etc

    working on a league table
    when sorting the league table ,I need to preserve the row and column
    I can preserve row and column by using the drop down menu on every cell,but would like to do it automatically(2 clicks to every cell)
    working in numbers
    yosemite 10.2

    This technique would be quite slow. Unfortunately, it's the only way I could think of if it's really an Excel file. If it's tab delimited file, you could read a whole thing into 2D array and work on Array instead of reading cell-by-cell.

  • How do I delete multiple rows and columns in an image?

    I am looking into how digital SLRs extract video data from a CMOS sensor. To give an example, the GH1 from Panasonic can record video at 1920 x 1080 from a 12 MPixel sensor that, say, is 4000 horizontal x 3000 vertical. How they do that seems to be not in the public domain, but there have been a few guesses (see http://www.dvxuser.com/V6/showthread.php?t=206797 and http://luminous-landscape.com/forum/index.php?showtopic=38713).
    One approach would be to simply read every second row of sensor pixels (1500 rows read from the original 3000) and once you have those in memory, delete every second column (2000 columns left). You would end up with a 2000 x 1500 image which could then be resampled to 1920 x 1080.
    I'd like to simulate what the camera appears to be doing, by generating a 4000 x 3000 test image and then asking Photoshop CS4 to delete the appropriate rows and columns. It may not necessarily be every second row; the Canon 5DMk11 appears to read every third row, so I may need to delete two out of every three rows.
    Can Photoshop do that sort of thing? If so, how?

    Thanks for the suggestions. Yes, I did take a detailed look at your images, but they weren't 100% convincing because it wasn't clear just what was happening. And Adobe's explanation, after reading it again, explains nothing at all to someone who doesn't know how Nearest Neighbor works.
    But you are correct -- Nearest Neighbor does effectively delete pixels. I proved it with the attached 6 x 6 image of coloured pixels (the tiny midget image right after this full stop -- you'll have to go to maximum zoom in PS to see it).
    These are the steps to delete every second row and then every second column.
    1. Select Image > Image Size.
    2. Set Pixel Dimensions > Height to half the original (in this case set to 3 pixels).
    3. Set Resample Image to Nearest Neighbor.
    4. Click OK and the image shoould now consist of three vertical white strips and three vertical Green-Red-Blue stripes.
    5. Repeat steps 1-4, but this time set Pixel Dimensions > Width to half the original (in this case set to 3 pixels). The image should now consist of three horizontal stripes Green-Red-Blue.
    Just to make sure the method worked for every third pixel, I repeated the above steps but with 2 pixels instead of 3 and obtained the correct White-Green, White-Green pattern.
    I resampled the Height and Width separately for the test so that I could see what was happening. In a real example, the height and width can be changed at the same time in the one step, achieving the same results as above.
    Finally, how to explain how Nearest Neighbor works in the simple cases described above?
    Division by 2
    In the case of an exact division by two (pixels numbered from top leftmost pixel), only the even numbered rows and columns remain. To put it a different way, every odd numbered row and column are deleted.
    Division by 3
    Only rows and columns 2, 5, 8, 11... remain.
    Division by N
    Only rows and columns 2, 2+N, 2+2N, 2+3N... remain.
    To put it simply, a resample using Nearest Neighbor (using an exact integer multiple) keeps every Nth row and column, starting from number two. The rest are deleted.

  • Displaying the Row and Column number in the report

    I am trying to show row and column number in the report (not just web preview). I am using Hyperion Reports Version 7.2.5.168

    use a formula column/row. use RANK function in that. (e.g. Rank([A], asc) will sort the rows based on column A values in ascending order)
    you can use this rank in your heading.
    But frankly this is not so easy. You have to do it in a very intelligent way, so that rank gives you column number/row number any how.
    Have a try and let see if you find a appropriate solution.
    Regards,
    Rahul

  • Limiting Columns in Cross Tab reports

    Plz tell me how to limit columns in Cross Tab.I have many columns which go on and even are not visible for Scroll and neither in another page
    Plz help.

    Check if http://winrichman.blogspot.com/2009/05/cross-tab-by-limiting-number-of-colums.html is helpful

  • How can I preserve row and column addresses on multiple cells at once in Numbers?

    How can I preserve row and column addresses on multiple cells at once in Numbers 3.2.2? I do a lot of rearranging and sorting and want to reference cells in other sheets. After entering the formulas (example: '=Sheet1::Table 1::H126') I will sort the table and the formulas will not move with the sort.  I think I can fix this by going cell by cell checking the 'preserve row' and 'preserve column' boxes when editing the formula.  I want to avoid having to go one by one.  I know that checking the boxes creates a formula like this: '=Sheet1::Table 1::$H$126'  I have also tried entering this manually and filling down but it doesn't include the preservations (the $$) in the autofill.  If there is another way to remedy my sorting problem that would also be welcomed!
    THANKS!!

    The title of the post is this
    How can I preserve row and column addresses on multiple cells at once in Numbers?
    I restated the Question as follows
    Can "Preserve Row" an / or "Preserve Column" be set on multiple cells at the same time.
    In both cases it is not asked if multiple cells can be set to....
    That is a given.
    Step back a second...  It is like selecting multiple cells and setting the text color of the currently selected cells to red. This can be done. More than one cell at a time modified because they are currently selected.
    Whats is being asked is:  if more than one cell is selected at the same time can the settings "Preserve Row" an / or "Preserve Column" be applied. No table I put up will help with that question.
    YES or NO
    If YES how?

  • Navigation on row and column total in pivot report

    Hi All,
    I have created a pivot report with 2 dimension columns and one measure and defined row and column total. Now, users wants to have a navigation report on the row/column total so that once he clicks on total value, he can see the detail report. While doing this, he also wants to pass on the 2 dimension column values to detail report.
    Is there any workaround for this?
    Thanks in advance.

    use a formula column/row. use RANK function in that. (e.g. Rank([A], asc) will sort the rows based on column A values in ascending order)
    you can use this rank in your heading.
    But frankly this is not so easy. You have to do it in a very intelligent way, so that rank gives you column number/row number any how.
    Have a try and let see if you find a appropriate solution.
    Regards,
    Rahul

  • How to Increase the Rows and Columns Size of Bex Query in Enterprise Portal  of SAP  7.3

    Dear All,
    Please let me know the process how to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Currently I am getting Only  4 columns and 10 rows in One Page .And I am getting 1,2 etc tabs for both row and column. So i want to increase the column length more than 100  and row length more than 10000.
    Please suggest me a suitable solution to over come this issue.
    Please find the Below screen shot.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • Limitation of row and column in FR report

    Hi all,
    i want to know what is the maximum number of row and column that we can display in FR report.
    and is there any possibility to increase the number of row and column in FR reports,if yes then how?
    Thanks in advance.

    Hi Andy,
    I think your asking if this or something similar could be used to go to another page rather than as a popup? The answer is yes. since you have already done the decode in your query, you can just go to the Report Attributes tab (I'm using version 2.2.1.00.04) and click the edit button for the column. Then, you can simply go to the
    HTML Expression [Insert column value] text area and insert:
    <!--
    <b>#A#<b>
    This will give you everything that is in the column link section, but I find it easier to work with since it's all together (personal preference).
    I reread your post and realized that you wanted to pass the A as a value and not the summary value of the column. I simply removed the #'s. I think this should work. I also kept the summary value using the #A# as the link. I belive that you can copy and paste this into each column (replacing the A with the appropriate column header of course...).
    If I were doing this I might create a CASE statement in the query and evaluate for null before creating the link. Here is an example of using that approach:
    CASE WHEN "STATUS" = 'U' AND ("CREATEDBY"=:APP_USER OR :APP_USER='MY_USER')
    THEN ''
    || '<img src="#WORKSPACE_IMAGES#edit.gif" border="0" alt="Click here to Edit">'
    || ''
    ELSE ''
    END LINK,
    Neil

  • Row and Column Template in Hyperion Reporting

    Hi
    Whenver I am trying to save a column of a report as a template , it is giving an error :
    "The selected columns contain one or more of the items below that cannot be included in templates:
    Invalid Input "
    I am not sure what does this mean. Though I have already deselected the "Link to Source Object". Can anyone suggest ?

    it may also worth cross checking below form doc:
    a.If your row and column template contains formulas with external references (for
    example, to cells outside of the selected row and column template), you are prompted
    to modify those formulas before saving the row or column template.
    Note: You can save a row and column template that contains cell formulas, as these can
    be discarded. For more information, see step 9.c on page 115.
    b. If a secondary database connection was specified within the row and column template,
    a dialog box displays prompting you to continue saving the template. If you save the
    template, the secondary database connection you specified in the row and column
    template is discarded. The primary database connection is then used for the row and
    column template.
    c. If unsupported properties are found, an Information dialog box presents a list of
    properties to discard before saving the template. For example, if the row and column
    template contains a cell formula, you can choose to save the template without the
    formula or not save the template.

  • Trouble Freezing Row and Column Headers

    I have created a report in HFR that is rather large. I need to freeze the row and column headers so that when I do a web preview, they are frozen and I can still see the headers when I scroll right or left or up and down. I have clicked on "Freeze Grid Headers" under the General tab on the Grid Properties sheet, but it only freezes my row headers and not my column headers. How do I get the column headers to freeze as well?
    Any help is greatly appreciated.

    there is nothing to do with servelts to solve thisCorrect. You may use IFRAME element on your page.

  • Hyperion Reports - Row and Column templates

    <p>Sorry if this may be a bit basic but we are new to Hyperionreports. Currently we are going through a redesign process and washoping to get some viewpoints on the benefits of using row andcolumn templates within reports. I am looking at this option butgetting frustrated by the limitations around formatting, etc</p><p> </p><p>Are there any views out there on the preferred options. We havea particular style in design we need to include which is becomingdifficult when we use row and column templates</p>

    it may also worth cross checking below form doc:
    a.If your row and column template contains formulas with external references (for
    example, to cells outside of the selected row and column template), you are prompted
    to modify those formulas before saving the row or column template.
    Note: You can save a row and column template that contains cell formulas, as these can
    be discarded. For more information, see step 9.c on page 115.
    b. If a secondary database connection was specified within the row and column template,
    a dialog box displays prompting you to continue saving the template. If you save the
    template, the secondary database connection you specified in the row and column
    template is discarded. The primary database connection is then used for the row and
    column template.
    c. If unsupported properties are found, an Information dialog box presents a list of
    properties to discard before saving the template. For example, if the row and column
    template contains a cell formula, you can choose to save the template without the
    formula or not save the template.

Maybe you are looking for

  • Trying to Buy Book is driving me mad...

    Using iLife 8 . Book all complete, photos all checked and placed. 20 pages crammed with photos, text where it should be, no alerts . Then push Buy Book and a box comes up saying : Your book seems to have frames on one or more pages that do not contai

  • Execution time in microseconds

    Hi, Can someone tell me what should be the ideal execution time of a program in microseconds. My program consists of 2586 lines and has almost around 10 subroutines and some 10 function modules. Could you suggest me how the execution time is determin

  • Java is gone

    I recently noticed that Java is gone from my Mac. How can I get it back? And can someone please check if Java is in the /developer/ folder? I thought I can delete the folder as I don't do softwaredevelopment on my mac and need all the diskspace for a

  • Startserv no respond

    Hi, Does anyone of you face the similar problem? In Sun Java System application server platform edition 9, starting app server using asadmin is ok, but using the startserv has no respond when you execute the command. Any idea? Thanks alot

  • Why do apps need access to the microphone on the iPhone?

    why do apps need access to the microphone on the iPhone?