Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match check

Hi

How do i create a dimension or expression the check another column for matching fields?

As per attachment: Create a Dimension called Unique Doc No Count that will check the 'Doc no' column. If the below field does not match the above field then mark as 1. It it matches, mark the top one a 1 and the duplicates as 0.

This is to enable to to filter for Unique Doc No.

please below attachment for further undertanding.

On Excel i would've used =IF(A2<>A1,1,0)

Capture.JPG

Regards

Charles

6 Replies
swuehl
MVP
MVP

In you LOAD script:

LOAD

     [Doc no],

     If( Previous([Doc No]) = [Doc no], 0,1) as [Unique Doc No Count]

FROM YourExcel.xls;

edit:

In general, look into the inter record functions, like Previous() and Peek().

marcus_sommer

Please do not double-posting: Match Cjeck

buzzy996
Master II
Master II

follow swuehl tht perfectly matches to u.

Not applicable
Author

Hi,

My data source is multiple tables from SQL server. Will that solution create the coloum or dimension i'm looking for?

swuehl
MVP
MVP

If you concatenate all records of [Doc No] into a single table, then use above script on a table sorted by [Doc No], it should work.

buzzy996
Master II
Master II

yes,u can use the above if expression on ur sql tables in qv edit script wherever u need.

that helps to create a new dim.