cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NotSoSlick
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 NameMost Recent Registration Date
Sam2/25/23
Jamie1/01/23
Steve2/10/23
Mike12/20/22
Sales Table 
Customer NameOrder Date
Sam2/13/23
Sam2/27/23
Sam3/30/23
Jamie12/02/22
Jamie12/27/22
Jamie1/06/23
Jamie1/31/23
Steve1/31/23
Steve2/11/23
Steve3/03/23

 

Output 
Customer NameFirst Order Date after Re-Registration Date
Sam2/27/23
Jamie1/06/23
Steve2/11/23

 

Thanks for your help!

 

The NotSoSlick Noob!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new measure.

Jihwan_Kim_1-1680234327554.png

 

 

Jihwan_Kim_0-1680234307713.png

 

 

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.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
NotSoSlick
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

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new measure.

Jihwan_Kim_1-1680234327554.png

 

 

Jihwan_Kim_0-1680234307713.png

 

 

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.


Go to My LinkedIn Page


Helpful resources

Announcements
Exciting changes

Power BI Community Changes

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

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors