{"id":5271,"date":"2024-02-29T18:20:28","date_gmt":"2024-02-29T16:20:28","guid":{"rendered":"https:\/\/bitimpulse.com\/?post_type=manual&#038;p=5271"},"modified":"2024-09-12T17:24:56","modified_gmt":"2024-09-12T14:24:56","slug":"obchyslyuvani-elementy","status":"publish","type":"manual","link":"https:\/\/bitimpulse.com\/en\/manual\/rozshyreni-mozhlyvosti-oformlennya-zvitiv-2\/obchyslyuvani-elementy\/obchyslyuvani-elementy\/","title":{"rendered":"Calculated Members"},"content":{"rendered":"<p>You have the possibility to create your own dimension members, based on the existing ones.<\/p>\n<p>To add calculated members to some hierarchy you have to click with the right mouse button on that hierarchy in the hierarchies list. In the context menu select \u201cCalculated Members\u2026\u201d:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_139-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4124\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_139-2.png\" alt=\"\" width=\"230\" height=\"296\" \/><\/a><\/p>\n<p>After that a window will appear for managing the calculated members from the selected hierarchy:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_17-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5280\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_17-2.png\" alt=\"\" width=\"330\" height=\"432\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_17-2.png 330w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_17-2-229x300.png 229w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/a><\/p>\n<p>To add a new calculated member, press the button as shown in the picture above. A wizard will appear that will help you to create a new member:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_141-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4126\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_141-2.png\" alt=\"\" width=\"440\" height=\"372\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_141-2.png 440w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_141-2-300x254.png 300w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p>In the first step you have two options:<\/p>\n<ul>\n<li>Function over set;<\/li>\n<li>Custom MDX.<\/li>\n<\/ul>\n<p>The second option is for experts familiar with MDX querying language and enables you to create a calculated member with a custom MDX query.<\/p>\n<p>Let\u2019s consider the first option. If you select it and press Next you will see the following form:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_142-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4127\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_142-2.png\" alt=\"\" width=\"390\" height=\"585\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_142-2.png 390w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_142-2-300x450.png 300w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_142-2-200x300.png 200w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/a><\/p>\n<p>Let\u2019s build the calculated member that will show the total value of the measures for the years 2015 and 2016. To do that, select \u201cSum\u201d in the \u201cFunction\u201d field. In the \u201cMeasure\u201d field leave the value \u201cCurrent Measure\u201d to make the summary value calculated over the currently selected measure. In the bottom part of the window you can see an elements tree where you can select the elements whose values will be counted in the sum. Select \u201cCY 2015\u201d and \u201cCY 2016\u201d as shown in the picture:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_143-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4128\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_143-2.png\" alt=\"\" width=\"390\" height=\"585\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_143-2.png 390w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_143-2-300x450.png 300w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_143-2-200x300.png 200w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/a><\/p>\n<p>After pressing \u201cFinish\u201d the new calculated element will be created:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_18-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5281\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_18-2.png\" alt=\"\" width=\"330\" height=\"89\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_18-2.png 330w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_18-2-300x81.png 300w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/a><\/p>\n<p>Now add the hierarchy with the new element (\u201cDate.Calendar\u201d in our case) to your report on rows or columns. Open the member selector and you will see a new calculated member there:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_21-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5287\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_21-2.png\" alt=\"\" width=\"462\" height=\"606\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_21-2.png 462w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_21-2-343x450.png 343w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_21-2-229x300.png 229w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/a><\/p>\n<p>Add this element to the selection to see the result:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_146-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4131\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_146-2.png\" alt=\"\" width=\"639\" height=\"254\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_146-2.png 639w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_146-2-450x179.png 450w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_146-2-300x119.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/a><\/p>\n<p>You can edit calculated members in the same management window that you used to add the member. There are buttons for editing and removing a member:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_19-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5282\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_19-2.png\" alt=\"\" width=\"330\" height=\"86\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_19-2.png 330w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_19-2-300x78.png 300w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/a><\/p>\n<p>You can also edit the calculated members from the context menu:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_20-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5283\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_20-2.png\" alt=\"\" width=\"330\" height=\"176\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_20-2.png 330w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/8_20-2-300x160.png 300w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/a><\/p>\n<p>Pay attention, that in the calculated members\u2019 management window you can see only elements from the hierarchy for which you opened that window. To see the elements from the other hierarchy click the right mouse button on that hierarchy and select the item \u201cCalculated Members\u201d.<\/p>\n<p>Let\u2019s edit our calculated member, so that it will show not the sum but the average value. To do that, select the element in the calculated members\u2019 management window and press the Edit button.<\/p>\n<p>In the \u201cFunction\u201d field change the value from \u201cSum\u201d to \u201cAverage\u201d and press \u00abOK\u00bb:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_150-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4135\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_150-2.png\" alt=\"\" width=\"390\" height=\"585\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_150-2.png 390w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_150-2-300x450.png 300w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_150-2-200x300.png 200w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/a><\/p>\n<p>Now look at your report, it should show the average value for two selected years:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_151-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4136\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_151-2.png\" alt=\"\" width=\"663\" height=\"251\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_151-2.png 663w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_151-2-450x170.png 450w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2024\/02\/6_151-2-300x114.png 300w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/a><\/p>\n<p>This way you can create any number of calculated members in different hierarchies and use them in your reports.<\/p>","protected":false},"featured_media":0,"parent":5206,"menu_order":381,"template":"","manuals":[18],"class_list":["post-5271","manual","type-manual","status-publish","hentry","manuals-bat-desktop"],"_links":{"self":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/manual\/5271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/manual"}],"about":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/types\/manual"}],"up":[{"embeddable":true,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/manual\/5206"}],"wp:attachment":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/media?parent=5271"}],"wp:term":[{"taxonomy":"manuals","embeddable":true,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/manuals?post=5271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}