Forum Discussion
Looking for Last Value for each
The last value for the last date for each Site/Area
Hi PaulPalkowski ,
You can create a column as follows:
Is most recent =
var thisSite = tablename[Site]
var thisArea = tablename[Area]
var mostRecentDate = CALCULATE(MAX(tablename[Date]),FILTER(ALL(tablename), tablename[Site] = thisSite && tablename[Area] = thisArea))
return
IF(tablename[Date] = mostRecentDate,"yes","no")
The above DAX will return a column with YES/NO value based on most recent record at Site and Area level. Move this column to your table visual and select "yes". This will just display recent record in the table for a combination of Site and Area.
You can modify the above code as just SITE level or AREA level also.
Replace the right table name and column name in the above dax provided.
Thanks,
Pragati
- PaulPalkowski5 years ago
Helper II
I dont want the last record, I want the value of the last record and display that with my current table
I have a column of values....So I am looking to replace TBD with the value from the last date for each site
- PaulPalkowski5 years ago
Helper II
Since I cannot see how this can be done in the same table
Is it possible to create a new table from the original table with the value for the last known date of each Site and Area
16 rows and then create a measure to do a lookup back to my table or matrix visual?