Forum Discussion

rstanleyraj's avatar
rstanleyraj
Frequent Visitor
9 years ago
Solved

Create a column by comparing two data sets

Hi,

 

I have to compare two different tables and create a column. Following is the sample input and output.

 

Input

Table 1

 

Product
A
B
A
E
S
A

 

Table 2

List
A
B
C
D

 

Output

ProductStatus
AAvailable
BAvailable
AAvailable
ENA
SNA
AAvailable

 

Could anyone please guide me how to achieve this.

Any help is greatly appreciated!

 

Thanks,

Stanley

  • STEP 1 CREATE A RELATIONSHIP BETWEEN TWO TABLESSTEP 2 CREATE A CALCULATED COLUMN WITH IF AND RELATED AS SHOWN ABOVE.

  • Perhaps a measure in Table 1 like:

     

    Status = IF(COUNTROWS(RELATEDTABLE(List))>0,"Available","NA")

     

     

3 Replies

  • STEP 1 CREATE A RELATIONSHIP BETWEEN TWO TABLESSTEP 2 CREATE A CALCULATED COLUMN WITH IF AND RELATED AS SHOWN ABOVE.

    • rstanleyraj's avatar
      rstanleyraj
      Frequent Visitor

      Thank you very much for the inputs. It worked.

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Perhaps a measure in Table 1 like:

     

    Status = IF(COUNTROWS(RELATEDTABLE(List))>0,"Available","NA")