Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Last Transaction Date with Filter?

How can i create a last or first transaction date for a customer by the manufacturer of what they ahve bought?

 

i cerate a first order or last ordser date calculation using the following, but how can i just create this for say Heinz product? when the customer buys many kinds of products with different transaction dates?

 

Last Transaction =
CALCULATE (
    LASTDATE ( 'Sales Details'[SalesTxnTimeModified] ),
    ALLEXCEPT ( 'Customer', 'Customer'[Customer Name] )
)

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Anonymous

     

    What if you add ProductName in ALLEXCEPT arguments

     

    Last Transaction =
    CALCULATE (
        LASTDATE ( 'Sales Details'[SalesTxnTimeModified] ),
        ALLEXCEPT ( 'Customer', 'Customer'[Customer Name], 'TableName'[ProductName] )
    )
    • Anonymous's avatar
      Anonymous
      Not applicable

      Zubair_Muhammad

       

      thanks Zubair, is there any way to do this using drop down slicers and filters?

       

      this si sample data below, i want to be able to put thew data in the table so that we can see account numbers and the sales figures and use slicer filters to see the customers who bought for example Henz product in the last 3 months

       

      But then to filter by hierarchy Level 3 as there could be multiple Level 3's for each manufacturer.

       

       

       

      YEAR_ENDINGPERIODPOSTING_DATENAV_NO_CODENAV_NO_DESCRIPTIONCustomer NumberCustomerDOCUMENT_NOQUANTITYRevenueCUSTOMER_NAMEMANUFACTURERRevenue GroupHierarchy Level 3
      2018101/01/2018NX-11111HeinzACC155 INVOICE123120NewciHeinzeCONDIMENTSTEA
      2018101/03/2018KTCH1KetchACC155 INVOICE125115DALEHeinzeCONDIMENTSLUNCH
      2018101/01/2018SLDCRM1SALADACC156 INVOICE1266200BOROMWORCESTERCONDIMENTSLUNCH