Is it possible to pull a max function without an entire query wall

Hi, I am currently stuck trying to figure out if I can have a value returned from {function max:} (which seems to require a previous query) with either the long query wall collapsed or without requiring the whole query resulting wall. As seen in the image provided, I am prevented from getting the {function :max} for the first entry because it needs to be connected to a query (which is why the second entry can do this properly).

My end goal is to be able to hover over the #Mountain-Climbers and to see the pop up with a very simplified result which is just “Record-High Mcset1: __” and below it the following “Record-High Mcset2” and so on

So the question would be is there a way to collapse the queries and or allow function :max to operate without having to see the the table (which is useful but would be better if it was optional and collapsed by default to allow for the simplified results to come first at the top)

[Image]

Yes and no :smiley:

So here’s a dataset I put together:
image

Option 1:
image

  • Pro
    • works with your current data
    • shows query results only once
  • Cons
    • results you’re looking for are at the bottom of the table

Option 2:
image

  • Pro
    • only shows the data you’re looking for
  • Cons
    • doesn’t work with your current data
    • a little harder to maintain / scale with new data

The second option uses an advanced query. However it cannot compare text and non-text. (I find it weird that the function option actually does work tbh)
Here’s the query anyway for your convenience

#+BEGIN_QUERY
{:title "Max workouts"
 :query [:find (max ?mcset4) (max ?mcset5)
  :keys mcset4 mcset5
  :where
   [?b :block/properties ?prop]
   [(get ?prop :mcset4) ?mcset4]
   [(get ?prop :mcset5) ?mcset5]
 ]
 :view (fn [rows]
  (for [r rows] 
    (str 
      "Record-High mcset4: " (get r :mcset4) "\n"
      "Record-High mcset5: " (get r :mcset5)
    )
  )
 )
}
#+END_QUERY

Thank you very much. My work around for this was to use the result then use the function in an indented block below it and then getting the link to that block reference and then pasting it right about. Which actually “worked” but only Sort of and now I am coming to new problems… I will only include images for now because this is becoming more time-consuming than i can afford (for now) . I’m coming to what I think is the narrowing of the limits of Logseqs current capabilities so I feel if i keep insisting im gona burn out again heh… I should just wait to see what the goal of Logseq’s project is by letting it come to a completion first otherwise endless time is spent trying to wrap my head around the narrowing limits.
27-19-23-122746
28-19-23-122852

1 Like

Yes I think you hit the limit of what is possible. I had played around a bit before my answer, but stuff didn’t want to play nice.

I appreciate the help and insight! thank you

1 Like