locked
DAX - Customer first purchase RRS feed

  • Question

  • I need a measure which returns me the first purchase of customers who bought product B (key product 2)

     

    This is my data model

     

    FactSales      
    KeyDate KeyCustomer KeyProduct Total
    1 1 1 12,9
    1 2 2 13
    1 3 1 156,4
    1 4 1 564,8
    2 1 1 894,8
    2 2 1 56,5
    3 1 2 564,85
    3 2 3 564,8
    4 1 1 1325,6
    4 2 1 132,3

     

    Customer
    KeyCustomer Name
    1 Jean
    2 Mari
    3 Lisa
    4 Julian
    5 Jhonny

     

    Calendar
    KeyDate Date
    1 01/01/2018
    2 02/01/2018
    3 01/05/2018
    4 01/08/2018

     

    Product
    KeyProduct Product
    1 A
    2 B
    3 C
    Wednesday, August 29, 2018 7:26 PM

All replies

  • Hi EvertonGomes12,

    Thanks for your question.
    >>>I need a measure which returns me the first purchase of customers who bought product B (key product 2)
    Could you please show us the expected results based on you sample data?


    Best Regards
    Willson Yuan
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, August 30, 2018 1:07 AM
  • @Willson Yuan

    I need to now every date of first purchase by customer

     

    Customer A - 20/01/2018

    Customer B - 14/01/2018

    Customer C- 22/01/2018

    Thursday, August 30, 2018 12:21 PM