Discussions

 View Only
  • 1.  Query that determines the Maximum number in a set of records.

    Posted 02-07-2023 17:18
    Is it possible to create query that results in the maximum value for a set of records? I see SumValues and Size, but no Maximum.

    ------------------------------
    George Bramhall
    ------------------------------


  • 2.  RE: Query that determines the Maximum number in a set of records.

    Posted 02-07-2023 17:22
    There should be Max function. 

    Hope this helps.

    ------------------------------
    Bibhav Rimal
    ------------------------------



  • 3.  RE: Query that determines the Maximum number in a set of records.

    Posted 02-07-2023 17:46
    Not sure how I would use the Max function in a Query formula.

    ------------------------------
    George Bramhall
    ------------------------------



  • 4.  RE: Query that determines the Maximum number in a set of records.

    Posted 02-07-2023 17:56
    The formula queries do not currently support Min or Max. The exception to that is that the Quarry results of returns and record ID sequence so if you happen to want to know the men or max of the record ID eight then there is a way to purse that out.  

    I do know that there is a Jinja Syntax that you can use in the Pipeline when you search a set of records it can return the highest and lowest value. I'm not the expert on that syntax but if that's useful we could try to figure that one out.  


    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Query that determines the Maximum number in a set of records.

    Posted 02-07-2023 18:08
    Thanks Mark,
    I am trying to use the query result to filter a report so the pipeline approach will not work. For the same reason, I don't think the Max record id will help. I do have a multi-text list of values from a query, but I don't know how to get the maximum value in that list in the query result.

    ------------------------------
    George Bramhall
    ------------------------------



  • 6.  RE: Query that determines the Maximum number in a set of records.

    Posted 02-08-2023 08:58
    Edited by Don Larson 02-08-2023 08:58
    You can get a Max or Min  value with a Jinja expression.  Credit goes to @Doug Henning

    Here is the max expression:
    {{querystepnumber|max(attribute=''searchfield'')|attr(''field_to_evaluate'')}}







    ------------------------------
    Don Larson
    ------------------------------



  • 7.  RE: Query that determines the Maximum number in a set of records.

    Posted 02-08-2023 12:41
    @Don Larson slowly building his arsenal of Jinja queries​

    ------------------------------
    Prashant Maheshwari
    ------------------------------