Forum Discussion

Ali Majed's avatar
Ali Majed
Copper Contributor
Apr 11, 2018

Change data format from poly-nominal to bi-nominal?

Greetings

I have a large data-set of transactions in a market that is in poly-nominal format. How can I change it into bi-nominal?

From:

001,milk,cheese,bread

002,butter,bread

To:

TID,milk,cheese,butter,bread

001,1,1,0,1

002,0,0,1,1

  • Assuming the same layout as your screen-shot:

    formula in cell A6: =A2
    formula in cell B6:F7: =IF(ISERROR(MATCH(B$5,$B2:$E2,0)),0,1)
  • JKPieterse's avatar
    JKPieterse
    Silver Contributor
    Assuming the same layout as your screen-shot:

    formula in cell A6: =A2
    formula in cell B6:F7: =IF(ISERROR(MATCH(B$5,$B2:$E2,0)),0,1)

Resources