Hello AppSheet community,
I am working on a health monitoring app, specifically for diabetic patients. In my app, I have a table named Test with columns such as Date and Average , representing the date and average values for each day.
I want to display only today's last average value on the app instead of all values
I appreciate any assistance or insights. Thank you!
Solved! Go to Solution.
Try the below. However, since I see that you also have a User reference I am wondering if you need any filtering specific to the user also. Just something to consider.
LOOKUP(MAXROW(Test[Test_ID],[Timestamp]),"Test","Test_ID","Average")
Hey man,
maybe something like:
CONCATENATE("User (", INDEX(SORT(Test[Average], TRUE), 1), ")")
Hey,
You're welcome!
Maybe this works too?
CONCATENATE("User (", INDEX(SORT(Test[Average], FALSE), 1), ")")
Wait, I thought you wanted to pluck the last average value of the day, not the Max average or the Min average. Sorting the average is just that, it is time independent. So what is it? It seems that in the screenshot you just got lucky that the average value you wanted also happened to be the last entry. Do you have a DateTime column in your table? Maybe I'm wrong in my assumption, but if you recorded the last value of the day at 5:00pm then you want that average value?
what is your advice for the situation?
you are right I need to the Last average when is Fasting blood
But the @Denny774 advice was also useful to me
I add the highest reading and the lowest
As I was explaining to @Denny774 if your average value for 24/01 would have been 201 instead of 181 then the suggested formula would have returned 188 which is the value from 23/01 rather than 24/01. Just to make sure, you would have wanted 201 returned from 24/01, is that correct?
@Markus_Malessa yes
@Markus_Malessa wrote:Max average or the Min average
Hey man,
that makes no sense, there is only one average, thats why it's called average ๐
If you look at the original screenshot, it has a Day column starting with January 24 - January 15 in descending order. The last day entry is January 24 with an average value of 181. This happens to be the minimum of the values in the list of averages, that is why I used Max/Min average language because at that point in time you are sorting averages from the minimum value to the maximum value or vice versa. Let's say the average value recorded on January 24 is 201 instead of 181. Then INDEX(SORT(Test[Average], FALSE), 1) would return 188 instead, which is not the last value if you take the day into consideration. That is all I was trying to point out. I could certainly be wrong in my assessment.
You are right, at first I thought it was working as it should.
That's why when I tried a higher number, the number before it was shown.
Try the below. However, since I see that you also have a User reference I am wondering if you need any filtering specific to the user also. Just something to consider.
LOOKUP(MAXROW(Test[Test_ID],[Timestamp]),"Test","Test_ID","Average")
User | Count |
---|---|
32 | |
31 | |
30 | |
19 | |
17 |