{"id":1272,"date":"2022-07-07T18:26:41","date_gmt":"2022-07-07T15:26:41","guid":{"rendered":"https:\/\/bitimpulse.com\/?p=1272"},"modified":"2023-05-10T09:33:57","modified_gmt":"2023-05-10T06:33:57","slug":"__trashed","status":"publish","type":"post","link":"https:\/\/bitimpulse.com\/en\/__trashed\/","title":{"rendered":"Select members for date type hierarchy in BAT as date range"},"content":{"rendered":"<p>In order for BAT to be able to set a date range selection<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/1-2.png\"><img decoding=\"async\" class=\"alignnone wp-image-1285 size-full\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/1-2.png\" alt=\"\" width=\"462\" height=\"606\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/1-2.png 462w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/1-2-343x450.png 343w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/1-2-229x300.png 229w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><\/a><\/p>\n<p>it is necessary that the dimension be designed accordingly.<\/p>\n<p>The date key must be in the YYYYMMDD format, the week key in the YYYYWW format, the quarter key in the YYYYQ format, the month key in the YYYYMM format, and the year key in YYYY format. The recommended key type is Integer. In addition, there should be a comment for the hierarchy that specifies which level is responsible for the day, which for the week, which for the month, which for the year, for example: \u00ab [YMD=Day, YW=Week, YQ=Quarter, YM=Month, Y=Year] \u00bb, where Day, Week, Quarter, Month, Year are the names of the corresponding levels. All 5 levels do not have to be present. If the name of one of the levels contains spaces, then it must be enclosed in square brackets [&#8230;].<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2.png\"><img decoding=\"async\" class=\"alignnone wp-image-1274 size-full\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2.png\" alt=\"\" width=\"1819\" height=\"999\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2.png 1819w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2-450x247.png 450w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2-1200x659.png 1200w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2-300x165.png 300w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2-768x422.png 768w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/2-1536x844.png 1536w\" sizes=\"(max-width: 1819px) 100vw, 1819px\" \/><\/a><\/p>\n<p>Tabular cubes do not have a Description field in multi-level hierarchies, but attribute hierarchies have this field. Therefore, you should write your desired comment in the properties for the corresponding attribute hierarchy in the Description field:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/3.png\"><img decoding=\"async\" class=\"alignnone wp-image-1275 size-full\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/3.png\" alt=\"\" width=\"834\" height=\"619\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/3.png 834w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/3-450x334.png 450w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/3-300x223.png 300w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/3-768x570.png 768w\" sizes=\"(max-width: 834px) 100vw, 834px\" \/><\/a><\/p>\n<p>If the client made a mistake when setting the description of the hierarchy in the cube, then he will receive an error log with the following content:<\/p>\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-16&#8243;?&gt;&lt;root&gt; &lt;LogRecord Date=&#8221;2015-09-11T10:14:17&#8243; Place=&#8221;DimensionsMeasuresBusiness.DataInit&#8221; Level=&#8221;Error&#8221;&gt;<\/p>\n<p>&lt;ApplicationUserInfo FirstName=&#8221;Lena&#8221; LastName=&#8221;Vayda&#8221; Login=&#8221;root&#8221; Telephone=&#8221;&#8221; Email=&#8221;<a href=\"mailto:lvayda@bitimpulse.com\">lvayda@bitimpulse.com<\/a>&#8221; \/&gt;<\/p>\n<p>&lt;Message&gt;<strong>Incorrectly set description for the hierarchy in the cube for date range.<\/strong>&lt;\/Message&gt;<\/p>\n<p>&lt;SystemInfo&gt;<\/p>\n<p>&lt;User&gt;URANUS:lvayda@BIT&lt;\/User&gt;<\/p>\n<p>&lt;Version&gt;4.120.0.0&lt;\/Version&gt;<\/p>\n<p>&lt;Process&gt;[4924] C:\\Program Files\\Business Analysis Tool\\4.120.1.0\\Admin\\BATAdmin.exe (4.120.1.0)&lt;\/Process&gt;<\/p>\n<p>&lt;ThreadID&gt;10&lt;\/ThreadID&gt;<\/p>\n<p>&lt;\/SystemInfo&gt;<\/p>\n<p>&lt;Exception&gt;Server: uranus\\sql2008; Database: Adventure Works DW 2008R2 Folders; Cube: Adventure Works Following hierarchies has incorrectly set levels:<\/p>\n<p>[Date].[Calendar]: Clendar Year;<\/p>\n<p>[Delivery Date].[Calendar]: Clendar Year;<\/p>\n<p>[Ship Date].[Calendar]: Clendar Year;<\/p>\n<p>&lt;\/Exception&gt;<\/p>\n<p>&lt;\/LogRecord&gt;<\/p>\n<p>&lt;\/root&gt;<\/p>\n<p>It means that<\/p>\n<p>Server:\u00a0uranus\\sql2008;<\/p>\n<p>Database:\u00a0Adventure Works DW 2008R2 Folders;<\/p>\n<p>Cub:\u00a0Adventure Works<\/p>\n<p>contains hierarchies that have incorrect levels:<\/p>\n<p>[Date].[Calendar]: Clendar Year;<\/p>\n<p>[Delivery Date].[Calendar]: Clendar Year;<\/p>\n<p>[Ship Date].[Calendar]: Clendar Year.<\/p>\n<p>How to fix it?<\/p>\n<p>In our case, the log is about description. Therefore, opening Microsoft Visual Studio, we see that the Calendar hierarchy has an incorrectly specified comment (description):<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4.png\"><img decoding=\"async\" class=\"alignnone wp-image-1276 size-full\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4.png\" alt=\"\" width=\"1810\" height=\"946\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4.png 1810w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4-450x235.png 450w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4-1200x627.png 1200w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4-300x157.png 300w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4-768x401.png 768w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/4-1536x803.png 1536w\" sizes=\"(max-width: 1810px) 100vw, 1810px\" \/><\/a><\/p>\n<p>You must specify the correct level name:<\/p>\n<p><a href=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5.png\"><img decoding=\"async\" class=\"alignnone wp-image-1277 size-full\" src=\"http:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5.png\" alt=\"\" width=\"1818\" height=\"943\" srcset=\"https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5.png 1818w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5-450x233.png 450w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5-1200x622.png 1200w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5-300x156.png 300w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5-768x398.png 768w, https:\/\/bitimpulse.com\/wp-content\/uploads\/2022\/07\/5-1536x797.png 1536w\" sizes=\"(max-width: 1818px) 100vw, 1818px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>We have described for you the process of selecting members for a date type hierarchy in BAT as a date range.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1272","post","type-post","status-publish","format-standard","hentry","category-blog"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/posts\/1272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/comments?post=1272"}],"version-history":[{"count":2,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/posts\/1272\/revisions"}],"predecessor-version":[{"id":1835,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/posts\/1272\/revisions\/1835"}],"wp:attachment":[{"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/media?parent=1272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/categories?post=1272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitimpulse.com\/en\/wp-json\/wp\/v2\/tags?post=1272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}