Method to create calculated column from all columns in PowerPivot model

StackOverflow https://stackoverflow.com/questions/22634595

  •  20-06-2023
  •  | 
  •  

Pergunta

I'm wanting to compare data in two powerpivot tables.

Is there a method in PowerPivot to compare two tables of data?

Or alternatively ...

I've created a "key" calculated column (as concatenation of 6 columns using '&') and I am creating a calculated column from all the remaining data - about 100 columns.

Is there a method / function that will allow me create that calculated column?

Edit: the reason is to perform data comparison checks on data before and after a data migration. Additionally, PowerPivot was dictated as being the technology of choice for this solution, much easier might have been using one of the RedGate compares.

Foi útil?

Solução

The best answer I could find was what I was originally doing.

  • Create a string concatenation of the 6 key columns as a CompoundKey Column
  • Create a string concatenation of the 100 (approx) data columns as a CombinedData Column

After initially checking that there were identical number of observations, I then did ordered the data in each table by the CompoundKey and performed a comparison of table1.CompoundKey to table2.CompoundKey and table1.CombinedData to table2.CombinedData.

This enabled me to find the Keys that were different between the two datasets then additionally to find any rows of data that were different for matching key rows.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top