Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there, here is the brief introduction for my question:
I have a main table [user-events] with user id, purchase date, product id etc.. I was trying to build up a RFM dashboard that allows to filter corresponding R, F, M values according to selected date :
(image of simplified RFM dashboard. With the "problematic" measure lastPurchaseDate )
Here is how I build up the dashboard:
First, I built up an aggregated RFM table with groupby() function on monetary values, it works fine (see #monetary below).
Then, I tried to calculate the lastPurchaseDate and attach the measure to my table variable (monetaryPerMonth), it seems wrong.
So, my questions is, how to add a last purchase date to [R F M aggregate] table, with blank values replaced by [purchase month] ?
@segmentread01 , In term of new column
Last purcahse = maxx(filter(Table, [User ID] = earlier([User id]) && [Purchase Date] < earlier([Purchase Date]) ), [Purchase Date])
Lastest purcahse = maxx(filter(Table, [User ID] = earlier([User id]) ), [Purchase Date])
Measure
Lastest purcahse = maxx(filter(allselected(Table), [User ID] = Max([User id]) ), [Purchase Date])
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.