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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a table with jobs records by customer and work date...I have the max work date...how do I get the prior work date?
Solved! Go to Solution.
Hi @Anonymous ,
Does the measure meet your requirement?
Prior Date =
VAR maxd =
MAXX ( ALL ( 'Table' ), 'Table'[work day] )
RETURN
CALCULATE (
MAX ( 'Table'[work day] ),
FILTER ( 'Table', 'Table'[work day] <> maxd )
)
Hi @Anonymous ,
Does the measure meet your requirement?
Prior Date =
VAR maxd =
MAXX ( ALL ( 'Table' ), 'Table'[work day] )
RETURN
CALCULATE (
MAX ( 'Table'[work day] ),
FILTER ( 'Table', 'Table'[work day] <> maxd )
)
This is great...thx!!! One more follow-up question...how do I get the sales from that prior date now that I have it?
Hi @Anonymous ,
Then we should update the measure as below.
Prior Date =
VAR maxd =
MAXX ( ALL ( 'Table' ), 'Table'[work day] )
RETURN
CALCULATE (
MAX ( 'Table'[work day] ),
FILTER ( ALL('Table'), 'Table'[work day] <> maxd )
)
To get the sales amount based on Prior date.
sales amount pri = CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[work day] = [Prior Date]))
So I am still having issues...when I put your Prior Date formula into a table it is not showing the prior date properly for each line. In the screen shot below you can see the formula, but when it translates into the table is for the most part shows the most current date plus two blanks. The columns that show the Current Work date and Prior Work dates are correct...my biggest issue is the prior sales (hours)...any formula I write including the one you gave me returns blanks as shown in the Prior Earned Hours +(-) and
Prior Earned Hours +(-) v2 versions. Strange that when I use the max date in the Current Earned Hours +(-) it properly shows the total hours.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 50 | |
| 34 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 77 | |
| 41 | |
| 26 | |
| 26 |