Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi - I've got a DAX measure to give me the latest availabe data from a sales table
hi @Dan_Alton ,
Not sure if i fully get you, supposing your sales table look like:
date | value |
9/1/2023 | 1 |
10/1/2023 | 1 |
10/2/2023 | 1 |
11/1/2023 | 1 |
11/2/2023 | 1 |
11/3/2023 | 1 |
12/1/2023 | 1 |
12/2/2023 | 1 |
1/1/2024 | 1 |
1/2/2024 | 1 |
1/3/2024 | 1 |
1/4/2024 | 1 |
try
1) add calculated table like:
dates =
ADDCOLUMNS(
CALENDAR(MIN(sales[date]), MAX(sales[date])),
"yymm", FORMAT([Date], "yy/mm")
)
2) relate sales[date] with dates[date]
3) plot a table visual with dates[yymm] with a measure like:
TotalPM =
CALCULATE(
SUM(sales[value]),
DATEADD(dates[Date],-1, MONTH)
)
it worked like:
Could you please provide the data table without sensitive information and how you expect the output to look like?
hi - my table is very simple - thanks
Apr-23 | 37.9 |
May-23 | 39.2 |
Jun-23 | 41.0 |
Jul-23 | 39.6 |
Aug-23 | 39.5 |
Sep-23 | 39.1 |
Oct-23 | 39.9 |