Hi, I have the following data in a table.
Id YearMonth Ratio
C10 200903 11
C10 200904 14
C10 201001 33
C10 201002 23
C10 201003 17
C10 201004 21
C21 200907 08
C21 200908 14
C21 200910 18
C21 201001 40
C21 201002 54
C21 201003 11
Now I want QV to calculate the longest period per Id in which sequal months show the Ratio-data (aging). For C10 this would be 4 months and a total of 94 and for C21 this would be 3 months and a total of 105. Ideally, I would want the user to be able to use a variable to set the current date (or select it) and QV then looks back from that data on to find the longest continuous range. Any suggestion on how to do this? Thanks! Sander.