cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper III

## Old vs New Customers

Hi Team,

I am not able to identify the new customers added in current month. Below is the link to access the excel file which is having the data of customers.

Thanks,

Anupam

1 ACCEPTED SOLUTION
Employee

Hi,

@Greg_Deckler, to flag the new customers added in current month, no need to compare the Day part in the condition of your formula.

@anupampandey, you should be able to use the formula below to create a calculate column in your customer table to flag the new customers added in current month.

```IsNewCustomAddedInCurrentMonth =
IF (
MONTH ( Sheet1[Tran_DT] ) = MONTH ( TODAY () )
&& YEAR ( Sheet1[Tran_DT] ) = YEAR ( TODAY () ),
1,
0
)```

Regards

4 REPLIES 4
Employee

Hi,

@Greg_Deckler, to flag the new customers added in current month, no need to compare the Day part in the condition of your formula.

@anupampandey, you should be able to use the formula below to create a calculate column in your customer table to flag the new customers added in current month.

```IsNewCustomAddedInCurrentMonth =
IF (
MONTH ( Sheet1[Tran_DT] ) = MONTH ( TODAY () )
&& YEAR ( Sheet1[Tran_DT] ) = YEAR ( TODAY () ),
1,
0
)```

Regards

Helper III

Thanks I got it right.

Regards

Employee

Great to hear the problem got resolved! Could you accept the corresponding reply as solution to help others who may have similar issue easily find the answer and close this thread?

Regards

Super User

`IsCurrentMonth = IF(DAY([Trans_DT]) = DAY(TODAY()) && MONTH([Trans_DT]) = MONTH(TODAY()) && YEAR([Trans_DT]) = YEAR(TODAY()),1,0)`

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...