cancel
Showing results for
Did you mean:
Frequent Visitor

## Re: Find first distinct value based on condition

You are geniuos! Thankyou for your help. Both formulas worked.

Frequent Visitor

## Re: Find first distinct value based on condition

Livio, if you could help me with the last new column please.

I need a column "FirstPeriodM1All" that is populated with a period number where M1 was first found per customer. The sample data will look like below.  The logic is similar that is in the "FirstPeriodM1" with the exception that all customer records are now populated with a corresponding period number (whole Number)

 Customer Method Period FirstPeriodM1 M1Customer Combined Method FirstPeriodM1All C1 M2 1 X M1 & M2 & M3 2 C1 M1 2 X X M1 & M2 & M3 2 C1 M3 2 X M1 & M2 & M3 2 C1 M1 3 X M1 & M2 & M3 2 C2 M2 1 M1 & M2 & M3 & M4 C2 M3 2 M1 & M2 & M3 & M4 C2 M4 3 M1 & M2 & M3 & M4 C3 M1 2 X X M1 &M3 & M4 2 C3 M3 3 X M1 &M3 & M4 2 C3 M4 4 X M1 &M3 & M4 2
Super User

## Re: Find first distinct value based on condition

Hello @Cyberguy23

You just need to leverage the first formula I posed, and use only this part:

```    CALCULATE(
MIN( Table1[Period] ),
ALLEXCEPT( Table1, Table1[Customer] ),
Table1[Method] = "M1"
)```