Join 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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Looking for some help please.
I am trying to return the previous 'Sale time' based on the 'Sales Person' of each row in my 'Sales' table.
Unfortunatley the index is based on all sales in the shop and thus I can't use -1 on the index as the Sales Person can vary.
See below image in Power BI, the DAX formula I have created using EARLIER in column 'Prior Sales Time (DAX Help)' is not returning the prior sales time for the sales person for the row. See the 'Prior Sales Time (the answer I'm after)' column for what the value I'm expecting in my DAX formula.
Any ideas?
Solved! Go to Solution.
=MAXX(FILTER(Sales,Sales[Sale Person]=EARLIER(Sales[Sale Person])&&Sales[Sale Time]<EARLIER(Sales[Sale Time])),Sales[Sale Time])
Perfect! thank you very much!
=MAXX(FILTER(Sales,Sales[Sale Person]=EARLIER(Sales[Sale Person])&&Sales[Sale Time]<EARLIER(Sales[Sale Time])),Sales[Sale Time])
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 5 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 15 | |
| 12 | |
| 12 |