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 using an Azure SQL DirectQuery dataset and I'd like to add a filter to only show data for the most recent timestamp. There will be multiple rows for a given timestamp. Any way to do this with DAX? I'd like to avoid making changes to my database and application if at all possible.
This is what I'm using, but it's a measure so I can't use it as a filter. And I can't use the MAX function in a calculated column.
Latest1 = IF(MAX(Query1[timestamp]) = CALCULATE(MAX(Query1[timestamp]), ALL(Query1[timestamp])), "Latest", "")
Solved! Go to Solution.
You may drag the measure to Visual level filters.
You may drag the measure to Visual level filters.
Hi @ats1958,
Why can't you use MAX in a calculate column?
The following works for me:
IsDateLatest = if(Dates[Dates]=MAX(Dates[Dates]),"Latest","")
Hope that helps
Alex
HI Alex, your solution was perfect. Howver I got another question. What if have to apply he time stamp filter for individul items in the data. For ex : we have multiple applications and each of them are scanning different time. Hence we need to filter data for respective application based on their most recent timestamp.
Please advise.
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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |