Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi
I am new to power bi and Dax. i am trying to return a previous value in a table. my data is similar to below:
Created Date | customer id | status | Reference | result I need | |
01/02/2022 | 1 | Progressed | 2 | ||
04/02/2022 | 1 | Active | 3 | 2 | |
03/02/2022 | 2 | progressed | 2 | ||
06/02/2022 | 3 | Active | 2 | ||
05/02/2022 | 4 | Progressed | 1 | ||
09/02/2022 | 4 | Active | 2 | 1 |
if a customer has both progressed and active in the status column i need to return the value for the progressed next to the active column so i can compare if it has increased/decreased.
Solved! Go to Solution.
@Anonymous ,
New column =
var _max = maxx(filter(Table, [Customer Id] = earlier( [Customer Id] ) && [Created Date] < earlier([Created Date]) ),[Created Date] )
return
maxx(filter(Table, [Customer Id] = earlier( [Customer Id] ) && [Created Date] = _max ),[Reference] )
@Anonymous ,
New column =
var _max = maxx(filter(Table, [Customer Id] = earlier( [Customer Id] ) && [Created Date] < earlier([Created Date]) ),[Created Date] )
return
maxx(filter(Table, [Customer Id] = earlier( [Customer Id] ) && [Created Date] = _max ),[Reference] )
Thank you, that appears to be working
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |