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.
I'm curious to know what the difference is as using this equation
Calculate( [Total],
Filter(All(Date), Date[Date] < Firstdate(Date[Date]))
yeilds blank as a result but,
Calculate([Total],
Filter(All(Date), Date[Date] < Min(Date[Date])) gives the correct result.
I assume Firstdate/Lastdate is syntax candy and contains a calculate statement which changes the filter context but, why?
Solved! Go to Solution.
Hi SteveD2,
Firstdate() returns a table with only one value so can't find a value less than the value itself. So Date[Date] < Firstdate(Date[Date]) will return blank.Please refer to this blog: http://sqlblog.com/blogs/marco_russo/archive/2013/10/22/difference-between-lastdate-and-max-for-semi....
In addtion, you can use
result = Calculate( MAX('Date'[Date]), LASTDATE('Date'[Date]))
instead of
result = Calculate( MAX('Date'[Date]), FILTER('Date', 'Date'[Date] = MAX('Date'[Date])))
Regards,
Jimmy Tao
Hi SteveD2,
Firstdate() returns a table with only one value so can't find a value less than the value itself. So Date[Date] < Firstdate(Date[Date]) will return blank.Please refer to this blog: http://sqlblog.com/blogs/marco_russo/archive/2013/10/22/difference-between-lastdate-and-max-for-semi....
In addtion, you can use
result = Calculate( MAX('Date'[Date]), LASTDATE('Date'[Date]))
instead of
result = Calculate( MAX('Date'[Date]), FILTER('Date', 'Date'[Date] = MAX('Date'[Date])))
Regards,
Jimmy Tao
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |