cancel
Showing results for
Did you mean:
Regular Visitor

## DAX HELP - First Sales Date After Customer Re Registers

Hi Dax Fam,

We have a client group that needs to register before they can place an order. I want to identify their first order date After they have re-registered. I'm completely stuck,

I'm trying the below but I'm not understanding something

=CALCULATE(MIN(Order Date]),FILTER(ALL(Order Date),[Order Date] >Most Recent Registration Date)
(Table Names and coloumns summarized)

See below tables and desired output

 Customer Table Customer Name Most Recent Registration Date Sam 2/25/23 Jamie 1/01/23 Steve 2/10/23 Mike 12/20/22
 Sales Table Customer Name Order Date Sam 2/13/23 Sam 2/27/23 Sam 3/30/23 Jamie 12/02/22 Jamie 12/27/22 Jamie 1/06/23 Jamie 1/31/23 Steve 1/31/23 Steve 2/11/23 Steve 3/03/23

 Output Customer Name First Order Date after Re-Registration Date Sam 2/27/23 Jamie 1/06/23 Steve 2/11/23

The NotSoSlick Noob!

1 ACCEPTED SOLUTION
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new measure.

``````expected result measure: =
IF (
HASONEVALUE ( Customer[Customer Name] ),
CALCULATE (
MIN ( Sales[Order Date] ),
FILTER (
Sales,
Sales[Order Date] > RELATED ( Customer[Most Recent Registration Date] )
)
)
)
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

2 REPLIES 2
Regular Visitor

Thank you Jihwan! Now i Found other issues with Dates coming in as text! Thank you so much for your help! You are super!

Cheers!

NotSoSlick

Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new measure.

``````expected result measure: =
IF (
HASONEVALUE ( Customer[Customer Name] ),
CALCULATE (
MIN ( Sales[Order Date] ),
FILTER (
Sales,
Sales[Order Date] > RELATED ( Customer[Most Recent Registration Date] )
)
)
)
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Announcements

#### Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

#### Power BI May 2023 Update

Find out more about the May 2023 update.