{"id":1189,"date":"2022-05-21T14:07:43","date_gmt":"2022-05-21T12:07:43","guid":{"rendered":"https:\/\/www.flip-design.de\/?p=1189"},"modified":"2022-05-21T14:07:43","modified_gmt":"2022-05-21T12:07:43","slug":"calculation-groups-how-to-exclude-measures","status":"publish","type":"post","link":"https:\/\/www.flip-design.de\/?p=1189","title":{"rendered":"Calculation Groups \u2013 How to exclude Measures"},"content":{"rendered":"\n<p>Mostly, if you read about Calculation Groups Inside Tabular Models, you get examples about Time Intelligence. But if you make other calculations, e.g., a Forex calculation, you don\u2019t want to apply the calculation to every measure. So, you don\u2019t want to apply the calculation to the Number of Sales or something like that. In that case, you can use SELECTEDMEASURENAME() to filter out these measures.<\/p>\n\n\n\n<p>To demonstrate it very simple, I have added a simple table to a Dashboard in a Day data model to get a forex to year.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image.png\"><img decoding=\"async\" loading=\"lazy\" width=\"335\" height=\"165\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image.png\" alt=\"\" class=\"wp-image-1190\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image.png 335w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-300x148.png 300w\" sizes=\"(max-width: 335px) 100vw, 335px\" \/><\/a><\/figure>\n\n\n\n<p>With this table we can calculate the USD vales to Euro. After creating this table, I created a calculation group with two members, one for Euro and one for USD to use this for a slicer. Inside the Tabular Editor I created following calculation for each member:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"555\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-1.png\" alt=\"\" class=\"wp-image-1191\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-1.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-1-300x176.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-1-768x451.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>IF (\r\n    NOT ( SELECTEDMEASURENAME () ) IN { \"NoOfSales\" },\r\n    CALCULATE ( DIVIDE ( SELECTEDMEASURE (), MAX ( 'Forex'&#91;Euro] ) ) ),\r\n    SELECTEDMEASURE ()\r\n)<\/code><\/pre>\n\n\n\n<p>The calculation checks, if the measure name is not the Number of sales, if yes, the results are divided by the given forex, if no, no calculation will be applied.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"256\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-2.png\" alt=\"\" class=\"wp-image-1192\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-2.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-2-300x81.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-2-768x208.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"900\" height=\"335\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-3.png\" alt=\"\" class=\"wp-image-1193\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-3.png 900w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-3-300x112.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/05\/image-3-768x286.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/a><\/figure>\n\n\n\n<p>With that solution you should be aware that, you need to add every measure that is not be calculated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mostly, if you read about Calculation Groups Inside Tabular Models, you get examples about Time Intelligence. But if you make other calculations, e.g., a Forex calculation, you don\u2019t want to apply the calculation to every measure. So, you don\u2019t want &hellip; <a href=\"https:\/\/www.flip-design.de\/?p=1189\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1189"}],"collection":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1189"}],"version-history":[{"count":1,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1189\/revisions"}],"predecessor-version":[{"id":1194,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1189\/revisions\/1194"}],"wp:attachment":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}