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
ballist1x
Helper III
Helper III

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 2
Zubair_Muhammad
Community Champion
Community Champion

@ballist1x

 

What if you add ProductName in ALLEXCEPT arguments

 

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

Regards
Zubair

Please try my custom visuals

@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

 

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.