Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors