Forum Discussion
return specific row of data between two dates
Hello!
I have the following data of where I'd like to return only the row with the "max" file end date on the ADHdate (so I can calculate the total in/total scheduled number for each max file end date and get a MTD average)
This will return the max file end date of all the files where the data is being retrieved from:
But I haven't been able to narrow down the row. All data is in the same table.
Thank you!
MDonovan try this measure:
Max End Date = CALCULATE ( MAX ( 'Table'[File End Date] ), INDEX ( 1, SUMMARIZE ( ALLSELECTED ( 'Table' ), 'Table'[ADH Date], 'Table'[File End Date] ), ORDERBY ( 'Table'[File End Date], DESC ), PARTITIONBY ( 'Table'[ADH Date] ) ) )Check new WINDOW functions Video playlist on my channel here https://www.youtube.com/playlist?list=PLiYSIjh4cEx0BDzmo48YIPzw_dIC0Kd95
2 Replies
- parry2kSuper User
MDonovan try this measure:
Max End Date = CALCULATE ( MAX ( 'Table'[File End Date] ), INDEX ( 1, SUMMARIZE ( ALLSELECTED ( 'Table' ), 'Table'[ADH Date], 'Table'[File End Date] ), ORDERBY ( 'Table'[File End Date], DESC ), PARTITIONBY ( 'Table'[ADH Date] ) ) )Check new WINDOW functions Video playlist on my channel here https://www.youtube.com/playlist?list=PLiYSIjh4cEx0BDzmo48YIPzw_dIC0Kd95
- MDonovanNew Member
The above solution will display the correct end date on that row, but now I'm having trouble using that measure to also calculate the totalinadh / totalsched number. any help is appreciated!