{"id":28008,"date":"2017-06-16T14:16:40","date_gmt":"2017-06-16T06:16:40","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=28008"},"modified":"2024-01-17T10:48:00","modified_gmt":"2024-01-17T02:48:00","slug":"ddmax","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/ddmax\/","title":{"rendered":"DDMax()"},"content":{"rendered":"\n<h2>Format<\/h2>\n<p class=\"intro-text\"><strong>DDMax(Input Values)<\/strong><\/p>\n<h2>Returns<\/h2>\n<p class=\"intro-text\">Calculates the maximum of the input values for each timestamp. Typically this function is used on the return value of a DDGet() or DDGetAttributes() call since these functions can return multiple values for a single timestamp (by fetching the attribute of several entities).<\/p>\n<p class=\"left-bar-yellow\">It is possible to retrieve very large volumes of data through indiscriminate use of this function. Retrieving large amounts of Historian data across a slow network can affect system performance for all users of the system.<\/p>\n<h2>Inputs<\/h2>\n<p class=\"intro-text\"><b>Input Values: <\/b>A collection of values where each value contains the necessary metadata (see <a href=\"#Useful_to_Know\">Useful to Know<\/a> below) which indicates the name of the source entity (<a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/ddget\/\">DDGet<\/a>() and <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/ddgetattributes\/\">DDGetAttributes<\/a>() can produce such return values).<br \/>\nBehaviour: Required<br \/>\nDimensions: Collection, MultiCollection<br \/>\nValid data types: Decimal, Integer<\/p>\n<p class=\"left-bar\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/calculation-syntax\/#Data_Type\">How to format data types<\/a><\/p>\n<h2><span id=\"Useful_to_Know\">Useful to Know<\/span><\/h2>\n<p class=\"intro-text\">In the calculation engine, values returned by DD() functions have metadata assigned to them, such as entity name and start\/end times. Other DD() functions can use this metadata to assign additional information to values they receive. In this way, the metadata is used by nested DD() functions to reduce complexity but increase versatility. Which metadata is used and how it is used is specific to each function, and is described in the Input Values section above, where applicable.<\/p>\n<h2>Examples<\/h2>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">DDMax(DDGetAttributes(DDGetEntities(\"myHierarchy\", 2, \"rootEntity\"), \":myAttribute\"))<\/span><br \/>\nDescription: This expression produces a similar result to \"Max({childEntity1:myAttribute}, {childEntity2:myAttribute},... {childEntityN:myAttribute})\".<br \/>\nResult: Returns the maximum of all fetched values of \"myAttribute\" for each child entity maximum 2 levels below the \"rootEntity\" in \"myHierarchy\".<\/p>\n<p class=\"left-bar\">Tip: If you have access to the sample data, try running the following examples using the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/configuring-your-system\/creating-a-calculation\/using-the-calculation-tester\/\">calculation tester<\/a>.\u00a0<\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">DDMax({SampleDDGet})<\/span><br \/>\nReturns: The maximum of all fetched values in the SampleDDGet calculation tag. This tag is actually the same as the DDGet() function in the below example.<br \/>\nResult: <span style=\"color: #0000ff;\">88.0653718430853<\/span><\/p>\n<p class=\"intro-text\">Expression: <span class=\"code-fragment\">DDMax(DDGet(\"P2 Corporate\", 5, \"Western Australia\", \":Oil Production\", \"{[Oil Producing Well]:Status} == 0\", \"Oil Producing Well\"))<\/span><br \/>\nReturns: The maximum value of the oil production, for each timestamp, of each Oil Producing Well in Western Australia, in the P2 Corporate hierarchy, where the well is online (status is 0). <br \/>\nResult: <span style=\"color: #0000ff;\">88.0653718430853<\/span><\/p>\n<h2><span id=\"Release_History\">Release History<\/span><\/h2>\n<ul class=\"intro-text\">\n<li>DDMax() 4.6.5\n<ul class=\"intro-text\">\n<li>Changed InputValues parameter to support MultiCollection values.<\/li>\n<\/ul>\n<\/li>\n<li>DDMax() 4.5.0\n<ul class=\"intro-text\">\n<li>Initial version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Calculates the maximum of the input values for each timestamp. <\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/calculations\/ddmax\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":28053,"parent":3650,"menu_order":90,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[100,282],"class_list":["post-28008","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-calculations","tag-data-dictionary","Version-4-5-0","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/28008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=28008"}],"version-history":[{"count":2,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/28008\/revisions"}],"predecessor-version":[{"id":64705,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/28008\/revisions\/64705"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/28053"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=28008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=28008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=28008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}