Forum Discussion
alawode
Helper I
5 years agoCalculated 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...
- 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())
Greg_Deckler
Community Champion
5 years agoalawode 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())alawode
Helper I
5 years agoGreg_DecklerThanks a lot, this works