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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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