Forum Discussion

alawode's avatar
alawode
Helper I
5 years ago
Solved

Calculated Column that matches current cloumn only

Hi Experts, I have a Current  "Customer 1" column with customer names and i am trying to create a new calculated column "Customer 2" that will ONLY accept values that currently exist in Customer 1 a...
  • Greg_Deckler's avatar
    Greg_Deckler
    5 years ago

    alawode Well, honestly, that makes no sense to me in terms of practical use. But, be that as it may, you would need an Index column or something that identifies "earlier" and "later" like a date field. Let's say you add an Index column to your table in Power Query Editor, then you could do this:

    Customer 2 Column = 
      VAR __Index = [Index]
      VAR __Customer = [Customer 1]
      VAR __MinIndex = MINX(FILTER('Table',[Customer]=__Customer),[Index])
    RETURN
      IF(__Index = __MinIndex,[Customer 1],BLANK())