March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I'm using a measure to find the last date of a row in table (table1) already filtered by a date segment. Looks like this:
Solved! Go to Solution.
As requested by few people, the code should look like this
New_measure =
VAR
variable=[last_date] #last_date is a measure
RETURN
CALCULATE(AVERAGE(Table1[volume];Table1[date]=variable)
last_date=
CALCULATE(LASTDATE(Table1[date]); #find the last date available in table1
DATESINPERIOD('CALENDAR'[Date];LASTDATE('CALENDAR'[Date]);-7;DAY)) #define the range of dates
Problem solved with VAR
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |