Sorting Matrix Column In Random Order

Aug 14, 2007



Hi,

I have a matrix report...the column results
are as follows

Con Std , Con Access, SF Std, SF Acc, Broadband, Pay TV

how would i make the columns appear in the above order when displaying as it is default alphetically sorted...I have tried putting numbers at the front which work till I get to the number 10 which alphetically sorted is next to 1 not 9?
is there a better way off sorting matrix column which have no specific criteria to sort from?

thanks

View 6 Replies


ADVERTISEMENT

Sorting A Matrix Subtotal Column

Oct 30, 2007

I have a matrix with the rows consisting of customers and the columns consisting of different revenue streams. The revenue streams are totalled using the matrix subtotal feature. I would like to sort, either interactively or statically (if that is the only option) by the subtotal column. I've read through everything I can find online and even the solutions that appear to be appropriate do not work. Can anyone give me a suggestion?

Thanks,
Zack Gallinger

View 5 Replies View Related

Reporting Services :: Matrix Report Column Sorting

Oct 29, 2015

I am creating a Matrix report using SSRS/Visual Studio 2008 as below:

Jan
Feb
March
April
May
June
July
Aug
Sept
Oct

A & B are customers. The values represent sales for each month.I have got most parts in place except the Month are displayed in random order (1,10,2,3,4,5,6 and so on).I have tried the option to create a calculated column with month numbers and change group properties but that did not work.how to get it to sort display as 1,2,3,4,5,6,7,8,9,10.

View 6 Replies View Related

Column Sorting In Ascending Order

Nov 27, 2007



Hi

I have Constructed a table

Table Name : MasterEntry

Column Name:
MasterEntryNumber
ServiceName
ServiceDepartment
EmployeeName

MasterEntryNumber is GenerationNumber where ever any entry is happen in table

if put a queries [select * From masterentry Order by MasterentryNumber] is give output in ascending order

e.g MasterEntryNumber has
1
2
3 it give correct ordering

but if i exceed more 10 if i put same queries

Output of queries is
1
10
11
2
3 this is the out of the queries if it exceed more 10 rows

i want queries should be look like this
1
2
3
...... 10

did any have experience on this issue please let me know where i can fix

kinds regards


View 8 Replies View Related

Sorting A Column In Descending Order Which Contains Two Years

May 21, 2014

I am trying to sort this simplied table:

ID - Time
1 2000-2001
2 2002-
3 2001-2003
4 1999
5 2005-2006

I want this as a result:

1999
2000-2001
2001-2003
2005-2006
2002-

Because the "-" means "continues", it the thing is still activated, so if it makes it easier, i could put the today's year afterwards during the query, if it ends with a - ...

Now, simply doing a
SELECT * FROM [table] ORDER BY TIME;

Sorts it "perfectly", apart from the "2002-" is just placed before 2005 and after 2001.

So, of course, it fails on all entries with a leading "-" ...

Right when I clicked "submit", of course, I can simply replace all entries with a time ending with "-", with the todays Year, so at least they will get at the end of the query...

Well, have to do a union, first sorting all without the "-", then sorting all with the "-", and that should be it...

View 5 Replies View Related

Matrix Report:Adding Average Column/Sorting Based On Last Month/Conditional Formating

Aug 2, 2007



I have a matrix report with 2 column SaleAmount and ProfitAmounts by Month like


Sale Profit
Dealer 5/1/2007 6/1/2007 7/1/2007 5/1/2007 6/1/2007 7/1/2007
A 100 200 300 20 25 15
B 200 250 50 30 45 19


how can i do following 3 things


1)Add Total column for Sale and Average column for Profit
2)Sort report by lastMonth of Sale (here 7/1/2007) High to low
3)if last month of sale(here 7/1/2007) is less than second last month here (6/1/2007) whole row should be red

thanks

View 1 Replies View Related

T-SQL (SS2K8) :: Unpivot Sorting Column In Alphabetical Order Automatically

Jan 27, 2015

I am having problem with the unpivot function of sql 2012, i unpivot my column then i get the result that i wanted but the error that i was encountering was the unpivot is automatically sort the column in alphabetically order which is not I desire,

Here is my code

@syear nvarchar(50)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

[Code] ....

View 1 Replies View Related

Sorting A Matrix

May 19, 2006

I am trying to sort a matrix by column. I first tried adding an interactive sort to the column heading, but it either gave me a run-time error, or there was not response. I then tried adding sorting to the row groups, and that doesn't seem to work either. I feel I have done every combination of groupings and sort expressions. Has anyone been able to accomplish this?
Thanks,
Kris

View 1 Replies View Related

Matrix Sorting

Jun 27, 2007

Hi. I need to implement a matrix that supports column sorting just like a table.
For example, given a matrix that contains...

Col1 Col2Row1 1 8Row2 2 6Row3 3 7

...if the user clicks on "Col2", I need the matrix to look like this:

Col1 Col2Row2 2 6
Row3 3 7Row1 1 8

I cannot use the interactive sort feature since the matrix must be WYSIWYG with the printed copy and the built-in interactive sort arrows do appear in printed output.

Here's my partial solution; my hope is that someone can point me in the right direction from here:

When the user clicks on a column heading I will jump to a URL such as:
http://myserver/myreport.aspx?SortField=Col2&SortDirection=Ascending

SortField and SortDirection are parsed by the web app and passed as parameters to my report.

So, after the user clicks on Col2 the report knows the following:
Parameters!SortField.Value = "Col2"
and
Parameters!SortDirection.Value = "Ascending"

Given this information, is there a way to tell the report's matrix to actually display the data in the order shown in the example above.

Thanks for any help you can provide.

View 1 Replies View Related

Interactive Sorting In A Matrix

Oct 16, 2006

Bill,

You say, "we enjoy the option of specifying sorting for
multiple columns within the matrix, table or list within which we
are working." But, when I add interactive sorting to the headers of a matrix, the up and down toggles appear in the preview, but the rows are not sorted after clicking.

This works perfectly fine on tables, as you say, but I have yet to see it on a matrix.

Thanks,

Tom

View 7 Replies View Related

Sorting Matrix Report

Jan 23, 2008

I have created a Matrix report with 5 row groups (Company and ProductName, ProductEndDate), one column group (Status) and two data columns(Amount & Count).



The report works fine except that it does not sort properly. I want to sort the data by Company, ProductEndDate, ProductName.

I took the following steps -- I highlighted the matrix and in the properties dialog box, selected the groups tab. In groups I selected each row group, hit the edit button, clicked the sorting tab and Company, ProductEndDate, ProductName.


View 3 Replies View Related

Sorting A Matrix On The Rowtotal

Jul 24, 2006

Is there a way to have a matrix sort his rows based on one of the total-values of the row ?

Ex

Col1 Col2 Col3 Total

Row1 10 25 35

Row2 1 10 9 20

Row3 2 2 2 6



Kind Regards

View 3 Replies View Related

Hot To Random ORDER?

Dec 1, 2007



I want to have a SELECT statement in stored procedure to make a random ORDER every time it runs, so one time ORDER BY first_name, then maybe person_telephone, then maybe per created_date, etc..

View 1 Replies View Related

How Can I Apply Dynamic Sorting For Columns In Matrix Reports

Apr 30, 2008

Hi,

We have a matrix report which displays columns in a default sorting order. This report columns vary dynamically depending on the user input.

e.g. If user wants to see the report for column Alfa, Beta , Gama then a report will be genarted with column Alfa, Beta , Gama sorted in alphabetical order.






Site
%Risk
Alfa
Beta
Gama

X
2
1
2
3

Y
10
4
5
6
However the users want the Columns to be sorted in the order which they provide the inputs e.g. if the user entered Gama, Alfa, Beta the report should display the columns in the same order instead of applying the default sorting order.






Site
%Risk
Gama
Alfa
Beta

X
2
3
1
2

Y
10
6
4
5

Any thoughts on ways to achieve this in SSRS matrix report would really help.

Cheers,
Viv

View 3 Replies View Related

How To Make A Random Order Query ?

May 1, 2004

If we use: select * from ..... , normally, it will return an ordered result ( may be order by ID ), but how can we make an random order select statement. It mean every time we run the query, the result will be different from the other ?

View 1 Replies View Related

Select At Random Order From Database

Dec 23, 2005

Hi,
I need to select few items from sql database.I know for ORDER BY, but I need those items to be mixed in random order every time when they are returned from database. Those are the same items every time, just randomly mixed.
Can i do it with SQL, or I have to find another way (e.g. to mix them after sql returns them)?

View 1 Replies View Related

Selecting Records By Random Order

Sep 22, 2000

Hello,

I need to select records by random order everytime user go to that page. QuestionID is the uniq field in this table.

SELECT * FROM QuestionMaster.

I tried to use the following statement to get the random records but I can't get the value in the variable out of this statement that I can use in my above select statement. Please HELP.

SELECT Convert(int,RAND()*97)

Thanks in a million.

Sarika

View 1 Replies View Related

Random Order For Test Questions

Oct 26, 2007

Hello Everyone,
I am using sql server 2000 to create a test database. I have two tables, a table for questions and one for answers. I want to create random orders for the test questions and answers. I tried to use the rand function but that doesn’t seem to work, because when I order by the random number, the questions are still in the primary key order. My primary key is 'questioned'. Can someone help me out on how to randomly order my questions and ansers?


Select questionID ,Rand(Questionid)from tblTestQuestions
order by rand(questionID)


Thanks
GEM

View 7 Replies View Related

Passing Parameter To OLAP As A Free Text And Interactive Sorting In Matrix

Apr 30, 2007

Dear All,



I am facing one problem with reporting services 2005 (SSRS), When i try to pass a parameter to Cube which is built in SSAS, i can not use a parameter where i can type the value instead of choosing it from a dimension.



Any way we can type the value for parameter, instead choosing from the drop down? If can, then how can we create the parameter? and how can i write a MDX to read it?



Thanks.



Regards,

Swarna.

View 4 Replies View Related

Sorting Date/timestamp Is Out Of Order

Jan 18, 2005

I have a problem with an Order By sort on a SubmissionDate column in my SQLSERVER DB.

I am inputing a timestamp in this format into the column above: 1/18/2005 11:03:19 AM

Problem is, once I sort this column in DESC order to return the results to a datalist dates with a time like this:

1/18/2005 1:03:19 AM

get placed out of place (lower on the return in DESC/higher on the return in ASC). I am assuming this is happening because it reads 1 as coming before 11 instead of after like it is with time. If this was in 24 hour format this wouldn't be a problem I guess because 1PM would be 13, so that is after 11.

Anyone know what I can do to get this sorted correctly?

View 3 Replies View Related

Field Not Sorting In Ascending Order

Dec 30, 2005

Hi, I've created a website usiing asp.net and all the data are stored in sql front. All the item are sorted in ascending order except one record. The correct order should be MP61, MP100, MP200, but this record is retrieved as MP100, MP200, MP61. If the coding is wrong, all the order displayed is not in ascending order. We have hundreds of  items, but why it happens to this particular record? Can anyone help? Thanks in advance

View 3 Replies View Related

Sorting The Data In Ascending Order .

Aug 16, 2002

Hi ,

Hopw can i sort the data in the ascending order so that i can see the date of my log files imported at the top of my table .

Right now my log files get imported and appended in the tables but they get appended in the descending order at the bottom of the last data .

Is there any way to sort the data so that i can see it in the reverse way when i open my tables ?

Many Thanks .

Anita.

View 1 Replies View Related

Sorting Cursor Output WITHOUT Using Order By

Mar 1, 2004

Hi,
I have a situation where I need to sort the output of a cursor. But since the sort criteria are rather complex, I am NOT able to use the Order By clause directly with the cursor definition statement.

Hence, I need to have a solution where I will use a dummy (calculated) field within the CURSOR and I want the output of this cursor sorted by the dummy field that I calculated within the cursor itself.

Please let me know the different possibilities in this scenario.

Thank you in advance
Raj

View 3 Replies View Related

Reporting Services :: SSRS Matrix - Add A Column In A Matrix With A Variance

Aug 6, 2015

I got the following code to add a column in a matrix with a variance:

IIF(IsNothing(Previous(Sum(Fields!Amount.Value))) or Fields!year.Value=First(Fields!year.Value,"Category") or Previous(Sum(Fields!Amount.Value))=0,nothing,
(
(Fields!Amount.Value)
/Previous(sum(Fields!Amount.Value))
)
)

This code works fine, except that the first row of the matrix shows an #error

This happens with each matrix where I use this expression. A warning emerges:

rsruntimeerrorinexpression the value expression for the textrun Textbox43.Paragraphs[0].TextRuns[0]' contains an error.

Attempted to divide by zero.

The strange thing is that the part

Fields!year.Value=First(Fields!year.Value,"Category")
should prevent an error and I expect it to show 'nothing'

An screenshot of the table. (each color is a different category. Each row stands for 2013, 2014, 2015)

As you can see, all other 2013 rows show a blank cell, except the first row.

View 3 Replies View Related

ORDER BY NOTESDATE DESC, CREATEDBY ASC --Not Sorting Properly

Mar 15, 2008

I am using sql statement like SELECT CREATEDBY,FIRSTNAME,BUSINESS,NOTES,NOTESDATE FROM BUSINESS ORDER BY NOTESDATE DESC, CREATEDBY ASC
But NotesDate is sorting descending order, but only sorting based on the date and month not on year
Please help me

View 4 Replies View Related

Integration Services :: Importing Text File Into Table - Random Data Order

Aug 3, 2015

I'm importing comma-delimited text files into a SQL table. The data imports in a seemingly random order. One time I import and the lines appear one way and the next time I import they import another way.

Is there a way to force the text files to import in the same order the data is found in the file?

View 10 Replies View Related

Evaluation Order For TextBox Field In Matrix In RS

May 27, 2008

Hi Guys,

Does anyone knows what is the evaluation order for expressions attached to "Value" property and "BackgroundColor" property for a field.

My problem is if a field is being changed in its value property to a particular value, will this changed value be recognised immediately by the Backgroundcolor property during its rule evaluation, it does not seem to be the case.

View 1 Replies View Related

Matrix SSAS Dimension/hierarchy Order Problem

Oct 4, 2006

I have a have a relatively simple SSAS cube that I'm trying to display in a matrix but the order of the data is not correct. The rows of the matrix are a time hierarchy and the query designer produces the correct MDX and when I run the MDX in the data tab, the order is correct. However in the report preview tab, the order is incorrect. Specifically, the time hierarchy looks like this Year-Month-FullDate. The report is ordering the Months like this 1,10,11,12,2,3,4,5,6,7,8,9. I ran the MDX query in Sql Studio and the order is correct, and I used Excel to consume the same cube and it produces the correct order.

The report is somehow treating the Month like character data instead of numeric, how do I fix this?

View 4 Replies View Related

Default Sort Order When Order By Column Value Are All The Same

Apr 14, 2008

Hi,
We got a problem.
supposing we have a table like this:

CREATE TABLE a (
aId int IDENTITY(1,1) NOT NULL,
aName string2 NOT NULL
)
go
ALTER TABLE a ADD
CONSTRAINT PK_a PRIMARY KEY CLUSTERED (aId)
go


insert into a values ('bank of abcde');
insert into a values ('bank of abcde');
...
... (20 times)

select top 5 * from a order by aName
Result is:
6Bank of abcde
5Bank of abcde
4Bank of abcde
3Bank of abcde
2Bank of abcde

select top 10 * from a order by aName
Result is:
11Bank of abcde
10Bank of abcde
9Bank of abcde
8Bank of abcde
7Bank of abcde
6Bank of abcde
5Bank of abcde
4Bank of abcde
3Bank of abcde
2Bank of abcde

According to this result, user see the first 5 records with id 6, 5, 4, 3, 2 in page 1, but when he tries to view page 2, he still see the records with id 6, 5, 4, 3, 2. This is not correct for users. :eek:

Of course we can add order by aid also, but there are tons of sqls like this, we can't update our application in one shot.

So I ask for your advice here, is there any settings can tell the db use default sort order when the order by column value are the same? Or is there any other solution to resolve this problem in one shot?

View 14 Replies View Related

Default Sort Order When The Order By Column Value Are All The Same

Apr 14, 2008

Hi,
We got a problem.
supposing we have a table like this:

CREATE TABLE a (
aId int IDENTITY(1,1) NOT NULL,
aName string2 NOT NULL
)
go
ALTER TABLE a ADD
CONSTRAINT PK_a PRIMARY KEY CLUSTERED (aId)
go

insert into a values ('bank of abcde');
insert into a values ('bank of abcde');
...
... (20 times)

select top 5 * from a order by aName
Result is:
6 Bank of abcde
5 Bank of abcde
4 Bank of abcde
3 Bank of abcde
2 Bank of abcde

select top 10 * from a order by aName
Result is:
11 Bank of abcde
10 Bank of abcde
9 Bank of abcde
8 Bank of abcde
7 Bank of abcde
6 Bank of abcde
5 Bank of abcde
4 Bank of abcde
3 Bank of abcde
2 Bank of abcde

According to this result, user see the first 5 records with id 6, 5, 4, 3, 2 in page 1, but when he tries to view page 2, he still see the records with id 6, 5, 4, 3, 2. This is not correct for users.
Of course we can add order by aid also, but there are tons of sqls like this, we can't update our application in one shot.
So I ask for your advice here, is there any settings can tell the db use default sort order when the order by column value are the same? Or is there any other solution to resolve this problem in one shot?

View 5 Replies View Related

Need New Columns And Random Generating Column

Aug 31, 2006

Hi,

i'm importing data from a txt file to Sql server table through a DTS package. the table is created dynamically.

i want three new cloumns added in the front and one of the columns should have a sequence number generation.

Please advice

View 2 Replies View Related

Random Ambiguous Column Name Error

Mar 7, 2008

Hi

I have a query that is exhibiting a strange behaviour on different databases.

I've got something like this ...


select a.col, ...
from tab1 as a inner join ...
union
select a.col, ...
from tab1 as a inner join ...
order by col

I know how to fix the problem, I make the last line read "order by a.col" ... that is understood.

However, on some databases I get an error and on others I don't. All databases are on the same server instance which is sql server 2005 developer (developer version isn't relevant as it happens on customer machines too).

I'm just wondering if anyone has any ideas why it is 'random'. It's as though the statement is being compiled differently on different databases ... what is influencing that ?

I'm fishing for a way to create a workaround, so if anyone has any ideas it might push me down the road of understanding why.

The real code is way too big to include here and it's not really relevant.


As a clue to what I'm looking for, if I copy the database to another database using SSIS, the resultant database doesn't cause the error despite being logically the same.

Presumably it is some physical or security difference that is causing the error to occur.

Thanks if you have any ideas,

Richard.

View 5 Replies View Related

Sorting Column

May 14, 2008

Hi all,

i have this column name "Effective Date". the data inside it is like this:




01-Aug-2006

01-Jan-2007

01-Jun-2006

01-Mar-2004

01-Nov-2003

01-Oct-2005

02-Oct-2007

05-May-2006

08-Oct-2003

1-Agustus-2005

10-Feb-2002

10-Jan-2005

10-Mar-2003

11-Feb-2008

12-Dec-2006

12-May-2008

14-Nov-2006

15-Jun-2004

19-Jun-2007

22-Mar-2007

23-Apr-2007

23-Jan-2008

26-Feb-2008

27-Jan-2005

27-Mar-2007

27-Sep-2007
How to sort the column? i've using Order by [Effective Date], but it doesnt work.

please help.

thanks,
Addin

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved