Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |