Comparing one column group value to another column group

Hi there,

I'm trying to get the difference between two values that are in seperate column groups:

  Class Session 1 Class Session 2
  Math Score Math Score Diff from class 1
Student 1 75 70 -5
Student 2 75 90 +15

 In other words, I want to subract the math score of class session 1(column group1) from the math score of class session 2(column group 2) and place that value in a new column that resides within column group two.  I have a bootleg way of getting the column to show up for column groups that are not first, but I have no idea how to compare the numbers from two different column groups.  Any help would be greatly appreciated.



1/8/2008 11:53:13 PM 4514 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 19


I’m afraid that I’m not quite clear on your words.

From your description, you want to compare the numbers from different columns, and the data in both columns are different fields in the same dataset, right?

If so, why don’t you try to select the value by “= Fields!AFKORTING.Value” and add them together in one field?  eg: fied!Item1.value-field!Item2.value+...-field!Item10.Value


Michael Jin.
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
1/11/2008 8:28:40 AM

Hi there,

Thanks for your reply.  Sorry I wasn't clearer in my initial description.  The items are the same, but I'm trying to compare the value of two different column groupings.  Here's the dataset I'm working with:

StudentId ClassSession_Number Math_Score
1 Class Session 1 75
1 Class Session 2 70
2 Class Session 1 75
2 Class Session 2 90

As you can see, each student has two records, one for each class session. We organized the data this way because depending on which class we were retrieving results for, the class session count could vary. So I'm trying to compare the same column, just in different records based on the column grouping. Please let me know if you need more information.

Thanks again!

1/14/2008 8:28:52 PM

Similar Artilces:

counting multiple values from the same column and grouping by a another column
This is a report I'm trying to build in SQL Reporting Services. I can do it in a hacky way adding two data sets and showing two tables, but I'm sure there is a better way. TheTable Order# Customer Status STATUS has valid values of PROCESSED and INPROGRESS The query I'm trying to build is Count of Processed and INProgress orders for a given Customer. I can get them one at a time with something like this in two different datasets and showing two tables, but how do I achieve the same in one query? Select Customer, Count (*) As Status1 FROM TheTable Where (Sta...

Grouping two columns into one column with GridView
I would like to modify the default output of a gridview to group two columns into one column. This is probably best explained by example. So, lets say there is a simple gridview with the output something like this:Name           Description                           Date------------------------------------------------------------------Foo            Some description of foo        Feb. 7, 2008Bar            Some description of bar        Feb. 6, 2008Instead, I would like the output to group the description with the name, and make it look something like:Name                                                Date ----------------------------------------------------------------------- Foo                                                Feb. 7, 2008Desc: Some description of fooBar                    &nb...

Passing value from one column to another column
Hi friends, I have  two drop down list controls in the Grid view control.I bound the data from data base.My problem is:             When i select value from first drop down list, the corresponding second drop down list generated  according to the  value selected in first drop down list.Please help me Regards.   Akhil   Regards,Akhil Raj K.R.Collaboratz. The Ajax Control Toolkit has a drop down list extender to use.  Goto  and review the C...

display the values of a column depending on the values of another one
Hi, I created a dataview and bound the data to a datagrid. But I want to add another column into datagrid and display an image link depanding on the value in one column in the dataview. for example, I have a column in dataview called "status": Status ------- completed incomplete in progress on hold Then, I want to display an image link to the location of a file if the status = "completed". How could I make this work? Thanks, Derek check out for helper functions.. hth***********************Dinakar NethiLife is short. Enjoy it.******...

copying one group members into another group
Hi,     I am having 2 groups named group1 and group2. I want to copy group1's member into group2.What is the fastest way to do this tasks. Group1 contains more then 10000 members.thanks------------------------------------------------------------------------------------Dont forget to click "Mark as Answer" on the post that helped you.------------------------------------------------------------------------------------~Mahesh Hi Guys,             I got the solution. I need to loop through and need to...

Ranking a column for sub-groups in a group datawindow
How can we get the ranking column to start over on each level break? i.e., For for each sub-group, it should be possible to somehow read the corresponding detail rows as row 1, 2, 3 etc and assign that value to the column. Is this possible? Thanks SC Try this expression: cumulativesum(1 for group 1) (assuming group 1 is the group level that you want the numbering to restart at). Ken "SC" <> wrote in message news:409fc5a5$1@forums-1-dub... > How can we get the ranking column to start over on each level break? i.e., > ...

insert multiple values from one table into one column from another table?
Hi, I'm attempting to create an insert statement that gets the values from multiple columns and insert them into one column from another table, is there a simple solution to do this?Here is something similar to what i'm wanting done, just it's not the correct way to do it, i want value1, value2 and value3 from one table to be combined and put into the value1 column of another table, what am i doing wrong? INSERT INTO tablename2 (value1 + value2 + value3)SELECT value1FROM tablename1 thanks in advance! INSERT INTO tablename2 (SELECT val1 + val2 + val3 FROM tabl...

Value of columns in group header ?
Hi, I've a group with a button and a Product column in the group header. When I click on the button, I want to get the value of the associated Product column. How can I do this ? I tried with Evaluate and First functions, but I must set the row number. So, how can I get the number of the first row of the group ? TIA Env : PB 6.5.1 Michel ...

Making hyperlink on one column in datagrid from values in other column
Dear friends,  I have columns in database: id, homepage (stores url of persons hompage), name. I want to display in datagrid in such a way that: Only name as hyperlink (hyperlink value to be retrieved from id value, so that direct link will not be available) will appear in datagrid. So, that when user will click on hyperlinked email, it should get redirect to homepage url i.e.<a href=redirect.aspx?id=1>John></a> Only john should appear in gridview and will be redirected to is homepage say   Thanks If u mean, how to place the I...

Make group be member of another group(nestet groups)
Hi! We have an IDM-sollution with wlan-authentication. We run eDir on OES2 Linux that also run iManager 2.7.3 All wlan-traffic goes trough a HP Access Controll Server. The ACS place users in the right VLAN based on group-membership. We are a school and all students in one class is member of its class-group. What we want is to put this class-group into another group called "exam". So if all students in this class now also are member of "exam", then the HP ACS will put then in its own VLAN that have limited access to Internet. In this case we talk about group-...

appending data from one column to another column in gridview
 Hi,I have 2 columns in this,Area    Areaunit100       sq.feet200       sq.yard400        meters  While showing area in gridview, i want to append its unit . Example 400 meters should be seen and not just 400<asp:BoundField DataField="area" HeaderText="AREA" SortExpression="area" />  Please Mark the post as "ANSWER" if it helps you One way is using template field, check this code..  <asp:TemplateField HeaderText="AREA"> <It...

Copy Data From One Datagrid Column To Another Column
Hi all, I am trying to copy data from one column in a datagrid to another column in the same datagrid. I am using buttons to do this, not the edit, update, cancel datagrid buttons. This is what I have been trying but with no luck :int RowCount;RowCount = 1;string DataValue;//while (RowCount < DataGrid1.Items.Count)//{// DataGrid1.SelectedIndex = RowCount;// DataGrid1.SelectedIndex = RowCount;// DataValue = DataGrid1.SelectedItem.Cells[4].Text;// DataGrid1.SelectedItem.Cells[3].Text = DataValue;} Help appreciated thanks. Try this <%@ Page Language="C#" %&...

Using the column value of another row in computed column.
Hi fellow PBer's, I am having trouble figuring out how to reference the column value of a specific row. In the computed columns property sheet, I select the "More" button to modify the columns expression. The way I understand help is to specify columnname[integer] where integer is the number of rows (positive or negative) relative to the current row (ie Total[-1] would be the value of the Total column in the previous row. However, I cant seem to get this to compile in the modify expression painter. I am using PB5.0 on Win95. Any help would be greatly appreciated. Ken Zuver Ken, Are you sure that the column name "Total" is being recognized by the DW painter ? What happens if you just use the name "Total" as the expression - it should compile and display the same value a second time in the same row. If this does work, then "Total[-1]" should work. Of course, to prevent runtime errors, I would put this within an If statement "If (GetRow()>1, Total[-1], 0)". HTH Sanjiv Das [TeamPS] K. Zuver <> wrote in message >Hi fellow PBer's, >I am having trouble figuring out how to reference the column value of a specific >row. In the computed columns property sheet, I select the "More" button to >modify the columns expression. The way I understand help is to specify >columnname[integer] where intege...

Move data from one column to another column and row
I need some help converting a table which has one row for each year.  Displaying the data so the each row will contain all of the information for the title and all of the years displayed in separate columns. I have a SQL Querry which returns the data looking like this (the querry is grouping by Title and by year, then adding up the quantity of rows): Basic Information needed for Life Insurance 25 2005 Basic Information needed for Life Insurance 45 2006 Ea Chairmans Conference 10 2005 EA Chairmans Conference Press Release 33 2005 EA Chairmans Conferenc...

populating a column in one table with data in a column from another table?
Hi,I have one main table and multiple smaller tables, the main table consists of all the information gathered from the smaller tables, plus some other data. I've set primary keys for all the smaller tables and created a relationship where the primary key id matches an id field inside the main table eg. there's a smalltableid column in both the smaller table and the main table.some misc info:i'm using a dataset (should the key in the dataset be pointing to the main table, or the smaller one?)both relation and foreign key constraints are created (with no rules set)my problem is, the data from ...

how to sum (column for all) except one group??
Hi I have a datawindow dual grouping method. under the trailer for the first grouping I would like to do a sum (grouping) for a total field for all groups within the 1st group except for one group. How can I do this?? sum(column for ???) KT I don't know if this is the best way but I would do this sum(column for all) - sum(column for unwanted group) Kenneth Tse wrote: > > Hi I have a datawindow > > dual grouping method. > > under the trailer for the first grouping I would like to do a sum > (grouping) for a total field for all groups within the 1st group except > for one group. > > How can I do this?? > > sum(column for ???) > > KT Kenneth -- In the expression "sum(column for all)", "column" can either be a column or an expression. If you replace "column" with an "if" expression, then you'll get what you want. Assume that you want a total for sales for all regions except for region 1. The following expression will give you the number you're looking for. sum ( if ( region = 1 , 0 , sales ) for all ) HTH Ron Gallagher, CPDP Atlanta, GA, USA Kenneth Tse wrote: > > Hi I have a datawindow > > dual grouping method. > > under the trailer for the first grouping I would like to do a sum > (grouping) for a total field for all groups within the 1st group except ...

Groups of groups
I need to add groups of users to a new group. Is there a way or workaround to do this? A customer is telling me that you can do in AD... Thanks Miguel Cando, Yes AD can do nested groups but eDirectory can't. One way to get around it is to use Dynamic Groups or create a new container and place the objects in there instead if possible. In all my years I've never had the need for nested groups. -- ___________________________________________ Niclas Ekstedt, CNA/CNE/CNS/CLS Network Consultant/NSC Sysop InfraSystems Solutions There is no "group of groups&quo...

how can get the group column value?
My dw have group and group total columns, I can use getitem to obtain the first group's group total value, but how can I get the other group's group total value? I use dw_report.getitemnumber(?, "group_total) no matter what value of ?, all return the first group total value!! pls help!!! ...

to Calculated Columns, then to update another column in same table in ADO.NET
to get several Columns, then pass those Columns into  one function which will return  a result,then using the result to update another column in same table in ADO.NET, How can I do this? thanks. Hi   what ever information you given is not clear. so please give me  detail info.Ganesan  Clarity is required. Plz explain clearly wts u r requirement.Thank uBaba Thank uBabaPlease remember to click "Mark as Answer" on this post if it helped you. ...

group some column
Hi all: I have report like the following: ----------------------------------------------------- cloumn 1 cloumn 2 cloumn 3 Nested Datawindow(Nested Report) cloumn x cloumn A cloumn Y cloumn B cloumn Z ------------------------------------------------------- The nested report has number of row changable. if it increase than 10 rows then new page will open and report printed in 2 pages. The Problem i want when report print in 2 pages all the columns from column X To Z moved to next page as group ...

When is a column not a column?
I have several extremely similar datawindows that I have to maintain that go against the same table. Recently, I had to add a column to that table, and also add the column to ALL of these datawindows that go against this table. I added the column to the first datawindow, set up the edit control style, etc. I then did a copy/paste of the columns edit control to the remaining dw's (of course remembering to first add the column in SQL). Everything (update props, column specs, column props) seems to indicate that the pasted column is linked to the column I selected, HOWEVER, when I...

Get column value from grouping header
I have created a datawindow with a grouping header. I wish to get the value of one of the column in the grouping. how can i do that? what is the syntax??? You can use GetItemXXX( <any row in group>, <column name> ). HTH -EGM KIWA <> wrote in message > I have created a datawindow with a grouping header. I wish to get the value > of one of the column in the grouping. how can i do that? what is the > syntax??? > > ...

How to place in DataGrids’s first column table’s column name, in second Datagrid’s column table’s column value?
Hello I use C#. I’m interesting are there samples solved my problem. Andrew. You will need to loop through the datasource of the datagrid or through the datagrid items and fetch the values for the second datagrid.Sonu Kapoor [MVP] Feel free to ask me any .NET question | Ajax Data Controls Forum Thank you! I solved my problem at the server cite. Andrew. ...

[*-)]how to delete all columns except one column for the corresponding column name......?
hi friends,          i've a table with (columns) username, content,data,........... i need to delete all column names(i.e.,content,data,........) except username for the specified username. eg: consider username=mahendran. i've to delete the values in the content,data,...............for the username=mahendran. but username should to do that?pls help me......  ---------------------------------------------------Don't forget to "Mark as Answer" if you are satisfied. Use the following  DataTable.Columns.Rem...

Web resources about - Comparing one column group value to another column group - Removes Post Comparing Facebook COO Sheryl Sandberg To Kim Polese
... Officer Mark Zuckerberg ) as Silicon Valley’s new It girl. That was one thing, and a fine thing. But when the article went beyond, comparing ...

Comparing Tech Companies by Revenue and Profit Per Employee, 2015
Two tweets from Dustin Curtis that tell a big story.

KidZilla - Counting, Comparing, Matching and Rhyming Fun for Kids! on the App Store on iTunes
Get KidZilla - Counting, Comparing, Matching and Rhyming Fun for Kids! on the App Store. See screenshots and ratings, and read customer reviews. ...

Comparing Satellites
jurvetson posted a photo: "This is our satellite here…. It has 10x the resolution of the big satellite there with one thousandth of the mass" ...

CNN Reporter OWNED For Comparing Cruise Experience To Katrina: We're On A Freaking Cruise Ship - YouTube ...
owned cnn comparing cruise katrina - CNN Reporter Smacked Down For Comparing Passenger's Experience To Katrina: 'We're On A Freaking Cruise Ship'. ...

Comparing Approval Ratings From Different Polling Firms - Rasmussen Reports™
Rasmussen Reports - The best place to look for polls that are spot on

Getting around Dubai: Comparing costs with other parts of the world
The reporters tasked with determining the best way to get from one end of Dubai to the other wanted to not only compare the costs with other ...

Menu comparing PM to quail an in-house joke, says restaurant owner
The menu that compared Julia Gillard's body to a cooked quail has been labelled an “in-house” joke by the owner of the Brisbane restaurant that ...

Lena Dunham criticised for comparing her Jewish boyfriend to her dog
... titled, 'Dog or Jewish Boyfriend? A Quiz', she asks readers to compare the similarities. Girls actor Lena Dunham has been criticised for comparing ...

Snapped: Comparing Nokia Lumia 1020, Samsung GS4 and HTC One camera quality
Nokia's brand-new Lumia 1020 Windows Phone packs one of the most unique phone cameras on the market today. Carl Zeiss Tessar lens; 41MP (forty-one-megapixel) ...

Resources last updated: 3/7/2016 2:10:51 PM