Compare the data in 2 DataTables that are not identical - c#-4.0

I need to compare 2 datatables. I'm attempting to compare the data in the tables but the column names and datatypes will not mathc as they are based on 2 different sources. Each datatable will have a column that is the id for the table so finding the associated row across tables will not be a problem. I'm looking for speed overall but I'm afraid I will have to do a column by column by row comparison. Can anyone share an effective method they may have used.
UPDATE: Should also have mentioned. The intent is to have a datatable that contains the data in dt1 that does not match dt2 so it can be bound to a grid for user action.

Related

How to categorize this data by frequency of another column?

I have several columns of data that need to be sorted into tables. What I would like is to go through each purely numerical column on the left and "a" column of the right. With two columns fixed, extract all unique values from the value column (there could be any number of them, but no repeats). Then I want to count them according to their category: a0 or aN where N>0. There's a fixed number of categories. It should result in the following table:
Example with test data
(6 tables should be produced in all for this example)
It should work in Excel 2007 for compatibility reasons. How would this be done? Is a VBA macro necessary?

manage relation between 2 data tables in spotfire

I'm creating a relation between two data tables A and B based on one column.
After creating the relation I'm able to see the matching rows in table A using the include matching rows option in filter panel, but when I select the exclude matching rows option then no filtering happens.
When excluding matching rows:
When including matching rows:
it's still not really clear what you're asking, but hopefully this bit from the manual will clear up your confusion:
When you have multiple data tables that are related to each other in your analysis, and the data tables do not include exactly the same rows, you may want to handle filtering in the related data tables in different ways, depending on whether you are interested in the filtered rows or the filtered out rows. To help show the difference between the three options available, we use an example with two related data tables, DT1 and DT2. Both DT1 and DT2 contain rows that are not available in the other data table (pink and yellow), but they also contain common rows (blue):
A = Rows in DT1 that are not available in DT2.
B = Rows in DT1 that are available in DT2, but have been filtered out.
C = Rows in DT1 that are available in DT2 and included in the currently filtered rows of DT2.
F = The filtered rows (rows remaining after filtering) in DT2.
When the filtering management for DT2 is specified (from the DT1 data table header) the different options will give the following results:
Include Filtered Rows Only
The first option will make all rows that are only present in DT1 disappear from the visualizations using DT1, since only the rows that are currently filtered in DT2 will be included. Hence, this option keeps only those rows that are present in both data tables (and have not been filtered out).
In the example above, this means that only the rows in C will remain after filtering in DT2.
Exclude Filtered Out Rows
The second option will remove those rows that have been filtered out from DT2 from all visualizations using DT1. Hence, this option keeps those rows that are filtered in DT2 as well as the additional rows from DT1.
In the example above, this means that A and C will remain after filtering in DT2.
Ignore Filtering
The third option is to ignore any filtering done in the related data table completely. This way, all rows that are available in the current data table will remain available.
In the example above, this means that A, B and C will all remain after filtering in DT2.

What exactly it mean by "Data Type of a Column Name" in Cassandra?

I am learning Cassandra. I came across this Datastax doc page.
This page explains about Column comparators and I stuck on a statement, it says
Within a row, columns are always stored in sorted order by their column name.
A comparator specifies the data type for the column name, as well as the sort order in which columns are stored within a row.
Question- My question is, what it means by Data Type of a Column name?
Till now I learned that a cassandra column ( or a cell for my unserstanding) has three attributes -
1 - Name of the column.
2 - Value of the column.
3 - A Time stamp which represents creation time of the cell.
Question-
I understand the Comaprator requires name of the column to sort the columns in a row, but why the data type of the column name? Data type shoud be always String for a column name.
If I read further on that page, it says
Typically, static table names will be strings, and the sort order of columns is not important in that case. For dynamic tables, however, sort order is important.
Above statement explains that column names are represented as String for Static tables. As per my understanding, with Dynamic tables we can add new columns which are not defined while defining the table. Now whatever new columns we add with whatever value (with any data type) in newly defined columns, the data type of the column name shoud be String, isn't it?
Am I missing something?

Can I identify calculated formula columns in power query source tables

I have a table that has some columns that are the result of a [power] query which has the key fields, some columns that are intended for manual data entry and some that are formula columns.
My problem is that when I refresh the query columns the manual input data associated with specific query rows don't remain on the same row.
To overcome this I use a query that first extracts the manual input data in the existing table together with the key fields, perform the new query and then do a table join at the end of the query to get the input data back in the correct record. (any input on alternative solutions welcome...)
For tables with no formula columns I could identify the manual input fields automatically using:
List.Difference(Table.ColumnNames(Current_Source_Table), Table.ColumnNames(Pre-Join_Query_Result)).
However, this would also pick up the calculated columns with excel formulas in. How to a distinguish these formula columns to exclude them? Preferably without having a naming convention that allows identification.
Many thanks,
Joe
Excel.CurrentWorkbook does not have information on where columns get their values from, so outside of naming conventions or other potential tricks I don't know, it is not possible to distinguish them.

Reporting Services 2005 Hide Columns Only in Certain Table Groups (eliminate white space)

I have a report (rdlc) that has a data set that has row grouping based upon certain field values.
It is set up to appear as separate tables for each grouping.
I now have a requirement to display a column for only one of these groupings.
For example, if value = a then show a column in the grouped table.
If value <> a then do not display this column.
I have tried several visibility techniques but cannot get the column to show in only one grouping.
The closest I got was to show the column in the required grouping, but it left white space for the column within the other tables.
Has anyone successfully tried anything similar?
Thanks for any and all assistance!!!
A table in SSRS ( and many other systems) must have the same columns for every row, and the same rows for every column. You can merge some of these, but that won't accomplish what you want: changing the number of columns for only some rows of the table.
I would separate this into multiple tables. Use the filters property of the different tables(tablixes) to filter each table to only display the appropriate rows if you would like to keep your current dataset.

Resources